Sergey Gotliv has uploaded a new change for review.
Change subject: sp: Remove redundant validation ......................................................................
sp: Remove redundant validation
Before deactivating storage domain we validate that this domain is a member of the pool. It seems that we performed that validation twice, first time by calling validatePoolSD and second time by checking in the list of the pooled domains.
Change-Id: I7bd94c40655c08ace5262d39b3087edc542f94b1 Signed-off-by: Sergey Gotliv sgotliv@redhat.com --- M vdsm/storage/sp.py 1 file changed, 1 insertion(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/24453/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py index a020e1e..638dfc7 100644 --- a/vdsm/storage/sp.py +++ b/vdsm/storage/sp.py @@ -1052,10 +1052,6 @@ self.validatePoolSD(sdUUID) self.log.info("sdUUID=%s spUUID=%s newMsdUUID=%s", sdUUID, self.spUUID, newMsdUUID) - domList = self.getDomains() - - if sdUUID not in domList: - raise se.StorageDomainNotInPool(self.spUUID, sdUUID)
try: dom = sdCache.produce(sdUUID) @@ -1095,6 +1091,7 @@ self.log.error("Can't umount masterDir %s for domain " "%s", masterDir, dom)
+ domList = self.getDomains() domList[sdUUID] = sd.DOM_ATTACHED_STATUS self._backend.setDomainsMap(domList) self.updateMonitoringThreads()
oVirt Jenkins CI Server has posted comments on this change.
Change subject: sp: Remove redundant validation ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7236/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6346/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7130/ : SUCCESS
Nir Soffer has posted comments on this change.
Change subject: sp: Remove redundant validation ......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/24453/1/vdsm/storage/sp.py File vdsm/storage/sp.py:
Line 1054 Line 1055 Line 1056 Line 1057 Line 1058 This ineed looks redundant, but the exception raised by validatePoolSD is se.StorageDomainNotMemberOfPool, while this code raises se.StorageDomainNotInPool.
Can you check which exception is expected by engine in this case?
Looks like we have also redundant exceptions here.
Nir Soffer has posted comments on this change.
Change subject: sp: Remove redundant validation ......................................................................
Patch Set 1: Code-Review+1
Looks good, the difference between the exceptions should be handled in another patch.
Itamar Heim has posted comments on this change.
Change subject: sp: Remove redundant validation ......................................................................
Patch Set 1:
ping
Itamar Heim has abandoned this change.
Change subject: sp: Remove redundant validation ......................................................................
Abandoned
no activity. please restore if relevant.
vdsm-patches@lists.fedorahosted.org