Ravi Nori has uploaded a new change for review.

Change subject: engine : Failed approved RHEVH for rhev3.2 host in rhevm av4 
with Data Centers 3.2 + 3.2 Cluster
......................................................................

engine : Failed approved RHEVH for rhev3.2 host in rhevm av4 with Data Centers 
3.2 + 3.2 Cluster

Changing oVirt node cluster during approve host
causes failure with error "Host CPU type is not
supported in this cluster compatibility version
or is not supported at all."

Change-Id: I6f485ce0512ae9c35be5b3f803b7ca1c35dea4f9
Bug-Url: https://bugzilla.redhat.com/1079834
Signed-off-by: Ravi Nori <rn...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
1 file changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/09/26409/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
index 277aad9..0c418cd 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
@@ -114,13 +114,17 @@
         
vds.setCpuName(CpuFlagsManagerHandler.FindMaxServerCpuByFlags(vds.getCpuFlags(),
                 getTargetCluster().getcompatibility_version()));
 
-        if (vds.getCpuName() == null) {
-            return 
failCanDoAction(VdcBllMessages.CPU_TYPE_UNSUPPORTED_IN_THIS_CLUSTER_VERSION);
-        }
 
-        if (getTargetCluster().getArchitecture() != ArchitectureType.undefined 
&&
-                getTargetCluster().getArchitecture() != 
vds.getCpuName().getArchitecture()) {
-            return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VDS_CLUSTER_DIFFERENT_ARCHITECTURES);
+        // CPU flags are empty if we change oVrt node cluster during approve 
process
+        if (vds.getCpuFlags() != null) {
+            if (vds.getCpuName() == null) {
+                return 
failCanDoAction(VdcBllMessages.CPU_TYPE_UNSUPPORTED_IN_THIS_CLUSTER_VERSION);
+            }
+
+            if (getTargetCluster().getArchitecture() != 
ArchitectureType.undefined &&
+                    getTargetCluster().getArchitecture() != 
vds.getCpuName().getArchitecture()) {
+                return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VDS_CLUSTER_DIFFERENT_ARCHITECTURES);
+            }
         }
 
         if 
(FeatureSupported.hostNetworkQos(getSourceCluster().getcompatibility_version())


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

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

Reply via email to