Dan Kenigsberg has submitted this change and it was merged.

Change subject: avoid creating hangover in storage domain cache after formatting
......................................................................


avoid creating hangover in storage domain cache after formatting

HSM._recycle(self, dom) tries to delete the storage domain from cache by
calling "sdCache.manuallyRemoveDomain(dom.sdUUID)". This is OK, but when
it invokes "dom.format(dom.sdUUID)" to format storage domain, the "dom"
is a proxy object and have to look for the true storage domain object by
calling 'StorageDomainCache._realProduce()', thus cause the storage
domain added to the cache again. This bug will prevent us re-using the
storage domain UUID even though we format it.

This patch invokes the format method of the proxy object first, then
delete the storage domain from cache, and can avoid creating hangovers.

Change-Id: Ie13a97ad6830553cbd099189dfb82d6f02ce82fe
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=806774
Signed-off-by: Zhou Zheng Sheng <[email protected]>
---
M vdsm/storage/hsm.py
1 file changed, 12 insertions(+), 6 deletions(-)

Approvals:
  Royce Lv: Looks good to me, but someone else must approve
  Mark Wu: Looks good to me, but someone else must approve
  Federico Simoncelli: Looks good to me, approved
  Vinzenz Feenstra: Looks good to me, but someone else must approve
  Dan Kenigsberg: 
  Zhou Zheng Sheng: Verified; Looks good to me, but someone else must approve


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie13a97ad6830553cbd099189dfb82d6f02ce82fe
Gerrit-PatchSet: 7
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: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Royce Lv <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to