Change in vdsm[master]: Remove redundant domStatuses parameter from validateAttached...
ewarszaw at redhat.com
ewarszaw at redhat.com
Wed Apr 17 20:18:24 UTC 2013
Eduardo has uploaded a new change for review.
Change subject: Remove redundant domStatuses parameter from validateAttachedDomain()
......................................................................
Remove redundant domStatuses parameter from validateAttachedDomain()
The only possible status of a SD belonging to a pool are active or
attached.
Then the domain status is irrelevant when checking membership to
the pool.
Change-Id: Ib3daea2fa5928dee18efdf6452b65fbc212eec54
Signed-off-by: Eduardo <ewarszaw at redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/14012/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 12fbc36..9bd538b 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -502,7 +502,7 @@
return True
@unsecured
- def validateAttachedDomain(self, dom, domainStatuses):
+ def validateAttachedDomain(self, dom):
"""
Avoid handling domains if not owned by pool.
"""
@@ -1039,10 +1039,9 @@
self.log.info("sdUUID=%s spUUID=%s", sdUUID, self.spUUID)
dom = sdCache.produce(sdUUID)
- domStatuses = self.getDomains()
# Avoid detach domains if not owned by pool
- self.validateAttachedDomain(dom, domStatuses)
+ self.validateAttachedDomain(dom)
if sdUUID == self.masterDomain.sdUUID:
raise se.CannotDetachMasterStorageDomain(sdUUID)
@@ -1102,7 +1101,7 @@
domainStatuses = self.getDomains()
dom = sdCache.produce(sdUUID)
# Avoid domain activation if not owned by pool
- self.validateAttachedDomain(dom, domainStatuses)
+ self.validateAttachedDomain(dom)
# Do nothing if already active
if domainStatuses[sdUUID] == sd.DOM_ACTIVE_STATUS:
--
To view, visit http://gerrit.ovirt.org/14012
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3daea2fa5928dee18efdf6452b65fbc212eec54
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>
More information about the vdsm-patches
mailing list