Kanagaraj M has uploaded a new change for review.

Change subject: engine: skip CPU checks while updating gluster cluster
......................................................................

engine: skip CPU checks while updating gluster cluster

While updating a cluster which supports gluster(doesn't support virt),
none of the cpu related checks will be performed.

Change-Id: I7ed98b2cdbcc3006ea42718497051131cbb55711
Bug-Url: https://bugzilla.redhat.com/902882
Signed-off-by: Kanagaraj M <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/12218/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java
index f2eed92..5ef561e 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java
@@ -157,7 +157,9 @@
         if (result) {
             allForVdsGroup = getVdsDAO().getAllForVdsGroup(oldGroup.getId());
         }
-        if (result && (oldGroup.getcpu_name() != null || 
getVdsGroup().getcpu_name() != null)) {
+        // Validate the cpu only if the cluster supports Virt
+        if (result && getVdsGroup().supportsVirtService()
+                && (oldGroup.getcpu_name() != null || 
getVdsGroup().getcpu_name() != null)) {
             // Check that cpu exist
             if (!checkIfCpusExist()) {
                 
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CPU_NOT_FOUND);
@@ -193,7 +195,7 @@
                     result = false;
                     
addCanDoActionMessage(VdcBllMessages.VDS_GROUP_CANNOT_UPDATE_COMPATIBILITY_VERSION_WITH_LOWER_HOSTS);
                     break;
-                } else if (missingServerCpuFlags(vds) != null) {
+                } else if (getVdsGroup().supportsVirtService() && 
missingServerCpuFlags(vds) != null) {
                     
addCanDoActionMessage(VdcBllMessages.VDS_GROUP_CANNOT_UPDATE_CPU_WITH_LOWER_HOSTS);
                     result = false;
                     break;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ed98b2cdbcc3006ea42718497051131cbb55711
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to