Federico Simoncelli has uploaded a new change for review.
Change subject: sp: ensure that master domain is active
......................................................................
sp: ensure that master domain is active
Change-Id: I4e8fe07ebf8e59e9b028678fecd0a24578348b6c
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/28331/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 482bdca..3f983b6 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1172,9 +1172,12 @@
domUUIDs = self.getDomains(activeOnly=True).keys()
# msdUUID should be present and active in getDomains result.
- # TODO: Consider remove if clause.
- if msdUUID in domUUIDs:
+ try:
domUUIDs.remove(msdUUID)
+ except ValueError:
+ self.log.error('master storage domain %s not found in the pool '
+ 'domains or not active', msdUUID)
+ raise se.StoragePoolWrongMaster(self.spUUID, msdUUID)
# TODO: Consider to remove this whole block. UGLY!
# We want to avoid looking up (vgs) of unknown block domains.
--
To view, visit
http://gerrit.ovirt.org/28331
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e8fe07ebf8e59e9b028678fecd0a24578348b6c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>