Adam Litke has uploaded a new change for review. Change subject: snapshot fixes ......................................................................
snapshot fixes Change-Id: I00b170f993cf98506f540fc188ae1e41e337a078 Signed-off-by: Adam Litke <ali...@redhat.com> --- M vdsm/storage/sdm/volume_artifacts.py 1 file changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/59761/1 diff --git a/vdsm/storage/sdm/volume_artifacts.py b/vdsm/storage/sdm/volume_artifacts.py index 3212093..daa3883 100644 --- a/vdsm/storage/sdm/volume_artifacts.py +++ b/vdsm/storage/sdm/volume_artifacts.py @@ -136,7 +136,7 @@ initial_size) raise se.InvalidParameterException("initial_size", initial_size) - def _clone_parent(self, parent, size): + def _create_snapshot(self, parent, size): # This function must be called after the parent volume id has been set # in the new volume's metadata so the garbage collector will be able to # undo this change to the parent volume in the event of a failure. @@ -153,7 +153,6 @@ self.log.debug("Setting volType to internal for volume %s", parent.vol_id) parent_vol.setInternal() - parent_vol.prepare(rw=False) try: qemuimg.create(self.volume_path, backing=parent.vol_id, format=sc.fmt2str(sc.COW_FORMAT), @@ -161,12 +160,10 @@ except Exception as e: raise se.CannotCloneVolume(parent_vol.volumePath, self.volume_path, str(e)) - finally: - parent_vol.teardown(parent.img_id, parent.vol_id) def _initialize_volume(self, vol_format, size, parent): if parent: - self._clone_parent(parent, size) + self._create_snapshot(parent, size) elif vol_format == sc.COW_FORMAT: qemuimg.create(self.volume_path, size, sc.fmt2str(vol_format)) -- To view, visit https://gerrit.ovirt.org/59761 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00b170f993cf98506f540fc188ae1e41e337a078 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <ali...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org