Zhou Zheng Sheng has uploaded a new change for review. Change subject: destroyStoragePool: release host id lease correctly ......................................................................
destroyStoragePool: release host id lease correctly In hsm.py destroyStoragePool, it calls pool.domainMonitor.close() before pool.detachAllDomains(). domainMonitor.close() assumes SPM is stopped and releases the host id lease for all domains, however this is not true, because the master storage domain is not detached and the cluster lock is still ative. This causes domainMonitor fail to release host id lease of the master domain but the monitor thread is stopped. In log file we can see this exception traceback. When we call formatStorageDomain, sanlock is still active on the id lease file so the domain can not be cleaned, and it raises an exception "MiscDirCleanupFailure: Directory cleanup failure" for fileSD, "VolumeGroupRemoveError: Volume Group remove error" for blockSD. Since pool.detachAllDomains() detaches master storage domain and releases cluster lock, pool.domainMonitor.close() should be called after pool.detachAllDomains(). Actually self._disconnectPool() indirectly calls pool.domainMonitor.close() at last, so there is no need to call it directly in destroyStoragePool(). This patch deletes the line calling pool.domainMonitor.close() in destroyStoragePool(), so that the cluster lock and host id lease of master storage domain are released in the correct order, and formatStorageDomain would succeed in cleaning the domain. Change-Id: Ie3b4eb587ddb4fc61b389f592d7a3e1ae239c1a3 Signed-off-by: Zhou Zheng Sheng <[email protected]> --- M vdsm/storage/hsm.py 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/16895/1 diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py index 7ce80d6..210e8d6 100644 --- a/vdsm/storage/hsm.py +++ b/vdsm/storage/hsm.py @@ -1118,7 +1118,6 @@ for sdUUID in domList: vars.task.getExclusiveLock(STORAGE, sdUUID) - pool.domainMonitor.close() pool.detachAllDomains() return self._disconnectPool(pool, hostID, scsiKey, remove=True) -- To view, visit http://gerrit.ovirt.org/16895 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie3b4eb587ddb4fc61b389f592d7a3e1ae239c1a3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
