Change in vdsm[master]: sp: prevent master demotion on activation

Federico Simoncelli fsimonce at redhat.com
Tue Jun 3 16:27:22 UTC 2014


Federico Simoncelli has uploaded a new change for review.

Change subject: sp: prevent master demotion on activation
......................................................................

sp: prevent master demotion on activation

Change-Id: I47a0c3ea16bcdefa99899e04c453eaf995344dfb
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/sp.py
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/28332/1

diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 3f983b6..3762c10 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -1041,7 +1041,15 @@
 
         # Domain conversion requires the links to be present
         self._refreshDomainLinks(dom)
-        self._backend.setDomainRegularRole(dom)
+
+        # This should never happen because we're not deactivating the
+        # current master in deactivateStorageDomain if a new master is
+        # not provided. It is also impossible to connect to a pool
+        # where the master domain is not active. Anyway to be on the
+        # safe side we must prevent the current master domain from
+        # being demoted to regular.
+        if sdUUID != self.masterDomain.sdUUID:
+            self._backend.setDomainRegularRole(dom)
 
         if dom.getDomainClass() == sd.DATA_DOMAIN:
             self._convertDomain(dom)


-- 
To view, visit http://gerrit.ovirt.org/28332
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47a0c3ea16bcdefa99899e04c453eaf995344dfb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>


More information about the vdsm-patches mailing list