Bug 670124 - spmStart should check that the master storage domain is active
Summary: spmStart should check that the master storage domain is active
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vdsm22
Version: 5.5.z
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Ayal Baron
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-17 09:44 UTC by Vladik Romanovsky
Modified: 2016-04-18 06:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-19 10:32:46 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Vladik Romanovsky 2011-01-17 09:44:42 UTC
Hi,

spmStart should check that the master storage domain is active



diff --git a/vdsm/storage/spm.py b/vdsm/storage/spm.py
index 904f532..a517f15 100644
--- a/vdsm/storage/spm.py
+++ b/vdsm/storage/spm.py
@@ -381,8 +381,13 @@ class SPM:
             pool = hsm.HSM.getPool(spUUID)
             pool.refreshDomains()
             masterDom = pool.getMasterDomain()
+            domList = pool.getDomains()
             oldlver = pool.getMetaParam(sd.LVER, cache=False)
             oldid = pool.getMetaParam(sd.SPM_ID, cache=False)
+           msdUUID = masterDom.sdUUID
+
+           if domList[msdUUID] != sd.DOM_ACTIVE_STATUS:
+               raise se.StorageDomainNotActive(msdUUID)
 
             if int(oldlver) != int(prevLVER) or int(oldid) != int(prevID):
                 raise se.SpmParamsMismatch(oldlver, oldid, prevLVER, prevID)

Thanks,

Vladik

Comment 1 Ayal Baron 2011-01-19 10:32:46 UTC
This will break pool creation process (cannot activate master domain for first time before spm is available). "FIXING" this will be a bug.


Note You need to log in before you can comment on or make changes to this bug.