Dan Kenigsberg has submitted this change and it was merged.

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]>
Reviewed-on: http://gerrit.ovirt.org/16895
Reviewed-by: Saggi Mizrahi <[email protected]>
---
M vdsm/storage/hsm.py
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Saggi Mizrahi: Looks good to me, approved
  Dan Kenigsberg: 
  Zhou Zheng Sheng: Verified


-- 
To view, visit http://gerrit.ovirt.org/16895
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3b4eb587ddb4fc61b389f592d7a3e1ae239c1a3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Elad Ben Aharon <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to