]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Merge "LVM: Activate source snap LV when cloning from volume"
authorJenkins <jenkins@review.openstack.org>
Thu, 30 Jan 2014 04:45:40 +0000 (04:45 +0000)
committerGerrit Code Review <review@openstack.org>
Thu, 30 Jan 2014 04:45:40 +0000 (04:45 +0000)
1  2 
cinder/volume/drivers/lvm.py

index 61fa1d12fb508634fe16cc6898c3e7c2eb64e2d7,220b865d1baf2cfe7abbd756818d5316e3ce116b..d5434ab4fe27feefca400bb6028808769f5835f4
@@@ -312,13 -309,13 +312,15 @@@ class LVMVolumeDriver(driver.VolumeDriv
                              self.configuration.lvm_type,
                              mirror_count)
  
+         self.vg.activate_lv(temp_snapshot['name'], is_snapshot=True)
          try:
 -            volutils.copy_volume(self.local_path(temp_snapshot),
 -                                 self.local_path(volume),
 -                                 src_vref['size'] * 1024,
 -                                 execute=self._execute)
 +            volutils.copy_volume(
 +                self.local_path(temp_snapshot),
 +                self.local_path(volume),
 +                src_vref['size'] * 1024,
 +                self.configuration.volume_dd_blocksize,
 +                execute=self._execute)
          finally:
              self.delete_snapshot(temp_snapshot)