Lior Vernia has uploaded a new change for review.

Change subject: engine: Block change to old cluster if network properties set
......................................................................

engine: Block change to old cluster if network properties set

Since we currently don't update VDSM upon cluster change in a host,
there is no way to wipe existing network custom properties on a host's
interfaces when moving to a cluster that doesn't support network
custom properties, and the operation should be blocked.

Change-Id: I16622d0374bde7ab2e440d81d82e830ad8d81949
Signed-off-by: Lior Vernia <lver...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/45/26645/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 52b05d3..437ede4 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
@@ -138,6 +138,15 @@
             }
         }
 
+        if 
(FeatureSupported.networkCustomProperties(getSourceCluster().getcompatibility_version())
+                && 
!FeatureSupported.networkCustomProperties(getTargetCluster().getcompatibility_version()))
 {
+            for (VdsNetworkInterface iface : getHostNics()) {
+                return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_NOT_SUPPORTED,
+                        
String.format("$ACTION_TYPE_FAILED_NETWORK_CUSTOM_PROPERTIES_NOT_SUPPORTED_LIST 
%s",
+                                iface.getNetworkName()));
+            }
+        }
+
         if (!targetClusterSupportsSetupNetworks() && hostHasLabeledNics()) {
             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_HOST_NETWORK_LABELS_NOT_SUPPORTED);
         }


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

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

Reply via email to