~0x44/nova/bug838466

« back to all changes in this revision

Viewing changes to nova/volume/manager.py

  • Committer: Cerberus
  • Date: 2011-02-28 17:39:23 UTC
  • mfrom: (749 nova)
  • mto: This revision was merged to the branch mainline in revision 762.
  • Revision ID: matt.dietz@rackspace.com-20110228173923-1e3upi2ddoc2j4xl
Merge from trunk and merge conflict resolution

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
            vol_size = volume_ref['size']
108
108
            LOG.debug(_("volume %(vol_name)s: creating lv of"
109
109
                    " size %(vol_size)sG") % locals())
110
 
            self.driver.create_volume(volume_ref)
 
110
            model_update = self.driver.create_volume(volume_ref)
 
111
            if model_update:
 
112
                self.db.volume_update(context, volume_ref['id'], model_update)
111
113
 
112
114
            LOG.debug(_("volume %s: creating export"), volume_ref['name'])
113
 
            self.driver.create_export(context, volume_ref)
 
115
            model_update = self.driver.create_export(context, volume_ref)
 
116
            if model_update:
 
117
                self.db.volume_update(context, volume_ref['id'], model_update)
114
118
        except Exception:
115
119
            self.db.volume_update(context,
116
120
                                  volume_ref['id'], {'status': 'error'})