Bug 670124

Summary: spmStart should check that the master storage domain is active
Product: Red Hat Enterprise Linux 5 Reporter: Vladik Romanovsky <vromanov>
Component: vdsm22Assignee: Ayal Baron <abaron>
Status: CLOSED NOTABUG QA Contact: yeylon <yeylon>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.zCC: abaron, bazulay, iheim, srevivo
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-19 10:32:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.