Federico Simoncelli has uploaded a new change for review.

Change subject: core: use Locked status when activating master domain
......................................................................

core: use Locked status when activating master domain

When we try to activate the master domain we should use the Locked
status because there is no "Activating" transition (it is active by
definition).
In general the master domain is always active, but this special flow
is used on the creation of the StoragePool when the first domain is
added.

Change-Id: I2f398a8fb946b339786f9776f460eab2f920c7b1
Signed-off-by: Federico Simoncelli <fsimo...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/78/28378/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
index 2b8c848..02746de 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
@@ -78,7 +78,10 @@
                         .getStoragePoolIsoMapDao()
                         .get(new 
StoragePoolIsoMapId(getParameters().getStorageDomainId(),
                                 getParameters().getStoragePoolId()));
-        changeStorageDomainStatusInTransaction(map, 
StorageDomainStatus.Activating);
+        // Master domain must not go through the Activating status.
+        changeStorageDomainStatusInTransaction(map,
+                (getStorageDomain().getStorageDomainType() == 
StorageDomainType.Master) ?
+                    StorageDomainStatus.Locked : 
StorageDomainStatus.Activating);
         freeLock();
 
         log.infoFormat("ActivateStorage Domain. Before Connect all hosts to 
pool. Time:{0}", new Date());


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f398a8fb946b339786f9776f460eab2f920c7b1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to