Liron Ar has uploaded a new change for review.

Change subject: webadmin: block reinitialize on uninitalized pool
......................................................................

webadmin: block reinitialize on uninitalized pool

When a pool is uninitalized there's no need to allow reinitializing
it, any wanted domain can be attached to the pool.
Allowing to perform reinitalize in that status caused to NPE in the
engine which currently attempts to load the current master domain of the
pool.
As there's no meaning for recovery/reinitialize in that scenario, it can
be blocked - as this issue was never encountered, we can add an engine
verification if and when it will be necessary.

Change-Id: I480b1f99ae881d43d34342ccb3bb248e60f556ce
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1069581
Signed-off-by: Liron Aravot <lara...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/25051/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java
index b777075..815d1da 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterListModel.java
@@ -894,8 +894,8 @@
             }
         }
 
-        getRecoveryStorageCommand().setIsExecutionAllowed(items != null && 
items.size() == 1
-                && !items.iterator().next().isLocal());
+        getRecoveryStorageCommand().setIsExecutionAllowed(storagePoolItem != 
null && items.size() == 1
+                && !storagePoolItem.isLocal() && storagePoolItem.getStatus() 
!= StoragePoolStatus.Uninitialized);
 
         // System tree dependent actions.
         boolean isAvailable =


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

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

Reply via email to