Change in vdsm[master]: hsm: Remove image run links in teardownImage

nsoffer at redhat.com nsoffer at redhat.com
Sun Feb 14 18:43:38 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: hsm: Remove image run links in teardownImage
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/53298/2/vdsm/storage/blockSD.py
File vdsm/storage/blockSD.py:

Line 1119: 
Line 1120:         If the image is based on a template image it should be expressly
Line 1121:         deactivated.
Line 1122:         """
Line 1123:         self.removeImageLinks(imgUUID)
> i'm not sure if its preferred, because that way we have a stale link till t
I'm keeping the symmetry by doing the operation in the opposite order, the common way to undo stuff.

Any way we choose, we may have partial failure - if we delete the link first, we may have no link and active lv, and if we delete the link last, we may have in active lv with stale link.

Having stale link is bad since we never recreate links in the current code.

On the other hand, if we remove the link first, and the image is still in use, deactivating the lv will fail.

Seems that removing the link last is safer in this case.
Line 1124:         allVols = self.getAllVolumes()
Line 1125:         volUUIDs = self._manifest._getImgExclusiveVols(imgUUID, allVols)
Line 1126:         lvm.deactivateLVs(self.sdUUID, volUUIDs)
Line 1127: 


-- 
To view, visit https://gerrit.ovirt.org/53298
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4568aaac2ce26c67132a839d95b75dd97bb28f29
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stirabos at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list