Ramesh N has uploaded a new change for review.

Change subject: engine: add_gluster_3_7_feature_support_flag to vds_group
......................................................................

engine: add_gluster_3_7_feature_support_flag to vds_group

 Add a new flag 'is_gluster_3_7_features_supported' to VdsGroups and
vdsDynamic tables. It helps to identify the cluster/hosts which is
in 3.5 cluster but still supports 3.6 cluster features like
GEO Rep, Snapshot, brick provisioning etc.

Note: GEO Rep, Snapshot are new features in Gluster 3.7, so the flag
is named is 'is_gluster_3_7_feature_supported'

Change-Id: Icba02b189a169bc676e0c5f47f7aaf394f0b49a6
Signed-off-by: Ramesh Nachimuthu <rnach...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNonOperationalVdsCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
M 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
M backend/manager/modules/dal/src/test/resources/fixtures.xml
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
M 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
A 
packaging/dbscripts/upgrade/03_06_1170_add_gluster_3_7_feature_support_flag_to_vds_group.sql
M packaging/dbscripts/vds_groups_sp.sql
18 files changed, 98 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/56/39756/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
index 9f19a22..c69381b 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
@@ -6,6 +6,7 @@
 import java.util.Map;
 import java.util.concurrent.Callable;
 
+import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.StringUtils;
 import org.ovirt.engine.core.bll.attestationbroker.AttestThread;
 import org.ovirt.engine.core.bll.job.ExecutionHandler;
@@ -85,7 +86,8 @@
     private boolean vdsProxyFound;
     private List<StorageDomainStatic> problematicDomains;
     private boolean connectPoolSucceeded;
-    private boolean glusterHostUuidFound, glusterPeerListSucceeded, 
glusterPeerProbeSucceeded;
+    private boolean glusterHostUuidFound, glusterFeaturesAreCompatible, 
glusterPeerListSucceeded,
+            glusterPeerProbeSucceeded;
     private static Integer MAX_RETRIES_GLUSTER_PROBE_STATUS;
 
     public InitVdsOnUpCommand(HostStoragePoolParametersBase parameters) {
@@ -376,6 +378,9 @@
         }
 
         if (type == AuditLogType.UNASSIGNED && 
getVdsGroup().supportsGlusterService()) {
+            if (!glusterFeaturesAreCompatible) {
+                type = AuditLogType.GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER;
+            }
             if (!glusterHostUuidFound) {
                 type = AuditLogType.GLUSTER_HOST_UUID_NOT_FOUND;
             } else if (!glusterPeerListSucceeded) {
@@ -389,6 +394,18 @@
     }
 
     private boolean initGlusterHost() {
+        glusterFeaturesAreCompatible = true;
+        if (ObjectUtils.equals(getVdsGroup().getCompatibilityVersion(), 
Version.v3_5)
+                && getVdsGroup().getGluster37Support() && 
!getVds().getGluster37Support()) {
+            glusterFeaturesAreCompatible = false;
+            Map<String, String> customLogValues = new HashMap<>();
+            customLogValues.put("installedGlusterVersion", 
getVds().getGlusterVersion().getMajor() + "."
+                    + getVds().getGlusterVersion().getMinor());
+            customLogValues.put("requiredGlusterVersion", "3.7");
+            
setNonOperational(NonOperationalReason.GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER,
 customLogValues);
+            return false;
+        }
+
         glusterHostUuidFound = true;
         if 
(GlusterFeatureSupported.glusterHostUuidSupported(getVdsGroup().getCompatibilityVersion()))
 {
             VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.GetGlusterHostUUID,
@@ -406,6 +423,7 @@
                 
setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_NOT_FOUND, null);
             }
         }
+
         return glusterHostUuidFound && initGlusterPeerProcess();
     }
 
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNonOperationalVdsCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNonOperationalVdsCommand.java
index 9a58d4a..d40ed89 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNonOperationalVdsCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNonOperationalVdsCommand.java
@@ -146,6 +146,8 @@
             return AuditLogType.MIXING_RHEL_VERSIONS_IN_CLUSTER;
         case UNTRUSTED:
             return AuditLogType.VDS_UNTRUSTED;
+        case GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER:
+            return AuditLogType.GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER;
         default:
             return (getSucceeded()) ? AuditLogType.VDS_SET_NONOPERATIONAL : 
AuditLogType.VDS_SET_NONOPERATIONAL_FAILED;
         }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
index 4db5ac0..b2b28c2 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
@@ -444,6 +444,7 @@
     GLUSTER_SETUP_GEOREP_MOUNT_BROKER(4145),
     GLUSTER_GEOREP_SESSION_CREATE_FAILED(4146, AuditLogSeverity.ERROR),
     CREATE_GLUSTER_VOLUME_GEOREP_SESSION(4147),
+    GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER(4148, AuditLogSeverity.ALERT),
 
     USER_FORCE_SELECTED_SPM(159),
     USER_VDS_RESTART(41),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
index 0dfbf9e..1105802 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
@@ -25,7 +25,8 @@
     NETWORK_INTERFACE_IS_DOWN(17),
     RNG_SOURCES_INCOMPATIBLE_WITH_CLUSTER(18),
     EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER_LEVEL(19),
-    MIXING_RHEL_VERSIONS_IN_CLUSTER(20);
+    MIXING_RHEL_VERSIONS_IN_CLUSTER(20),
+    GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER(21);
 
 
     private final int value;
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
index 70bac0e..0b2f03a 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
@@ -1302,6 +1302,14 @@
         return vdsDynamic.getLiveMergeSupport();
     }
 
+    public void setGluster37Support(boolean value) {
+        vdsDynamic.setGluster37Support(value);
+    }
+
+    public boolean getGluster37Support() {
+        return vdsDynamic.getGluster37Support();
+
+    }
     public boolean isBalloonEnabled() {
         return balloonEnabled;
     }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
index b198c34..1a89539 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDSGroup.java
@@ -110,6 +110,8 @@
 
     private Boolean migrateCompressed;
 
+    private Boolean gluster37Support;
+
     public VDSGroup() {
         migrateOnError = MigrateOnErrorOptions.YES;
         name = "";
@@ -424,6 +426,14 @@
         this.groupHostsAndVms = groupHostsAndVms;
     }
 
+    public Boolean getGluster37Support() {
+        return gluster37Support;
+    }
+
+    public void setGluster37Support(Boolean gluster37Support) {
+        this.gluster37Support = gluster37Support;
+    }
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -459,6 +469,7 @@
         result = prime * result + (autoConverge == null ? 0 : 
autoConverge.hashCode());
         result = prime * result + (migrateCompressed == null ? 0 : 
migrateCompressed.hashCode());
         result = prime * result + (maintenanceReasonRequired ? 1231 : 1237);
+        result = prime * result + (gluster37Support == null ? 0 : 
gluster37Support.hashCode());
         return result;
     }
 
@@ -505,7 +516,8 @@
                 && ObjectUtils.objectsEqual(fencingPolicy, other.fencingPolicy)
                 && ObjectUtils.objectsEqual(autoConverge, other.autoConverge)
                 && ObjectUtils.objectsEqual(migrateCompressed, 
other.migrateCompressed)
-                && ObjectUtils.objectsEqual(maintenanceReasonRequired, 
other.maintenanceReasonRequired);
+                && ObjectUtils.objectsEqual(maintenanceReasonRequired, 
other.maintenanceReasonRequired)
+                && ObjectUtils.objectsEqual(gluster37Support, 
other.gluster37Support);
     }
 
 }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
index dab637d..82fa297 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VdsDynamic.java
@@ -162,6 +162,8 @@
 
     private String maintenanceReason;
 
+    private Boolean gluster37Support;
+
     public VdsDynamic() {
         rpmVersion = new RpmVersion();
         libvirtVersion = new RpmVersion();
@@ -185,6 +187,7 @@
         supportedRngSources = new HashSet<>();
         liveSnapshotSupport = true;  // usually supported, exceptional case if 
it isn't.
         liveMergeSupport = true;
+        gluster37Support = false;
     }
 
     public Integer getCpuCores() {
@@ -698,6 +701,14 @@
         this.maintenanceReason = maintenanceReason;
     }
 
+    public Boolean getGluster37Support() {
+        return gluster37Support;
+    }
+
+    public void setGluster37Support(Boolean gluster37Support) {
+        this.gluster37Support = gluster37Support;
+    }
+
     @Override
     public int hashCode() {
         final int prime = 31;
@@ -762,7 +773,7 @@
         result = prime * result + (liveSnapshotSupport ? 0 : 1);
         result = prime * result + (liveMergeSupport ? 0 : 1);
         result = prime * result + (maintenanceReason == null ? 0 : 
maintenanceReason.hashCode());
-
+        result = prime * result + (gluster37Support == null ? 0 : 
gluster37Support.hashCode());
         return result;
     }
 
@@ -836,6 +847,7 @@
                 && ObjectUtils.objectsEqual(supportedRngSources, 
other.supportedRngSources)
                 && liveSnapshotSupport == other.liveSnapshotSupport
                 && liveMergeSupport == other.liveMergeSupport
-                && ObjectUtils.objectsEqual(maintenanceReason, 
other.maintenanceReason);
+                && ObjectUtils.objectsEqual(maintenanceReason, 
other.maintenanceReason)
+                && ObjectUtils.objectsEqual(gluster37Support, 
other.gluster37Support);
     }
 }
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
index 3ab7040..2afc6df 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDynamicDAODbFacadeImpl.java
@@ -113,6 +113,7 @@
             
entity.setSupportedEmulatedMachines(rs.getString("supported_emulated_machines"));
             
entity.getSupportedRngSources().addAll(VmRngDevice.csvToSourcesSet(rs.getString("supported_rng_sources")));
             entity.setMaintenanceReason(rs.getString("maintenance_reason"));
+            entity.setGluster37Support((Boolean) 
rs.getObject("is_gluster_3_7_features_supported"));
             return entity;
         }
     }
@@ -267,7 +268,8 @@
                 .addValue("supported_emulated_machines", 
vds.getSupportedEmulatedMachines())
                 .addValue("is_live_snapshot_supported", 
vds.getLiveSnapshotSupport())
                 .addValue("is_live_merge_supported", vds.getLiveMergeSupport())
-                .addValue("maintenance_reason", vds.getMaintenanceReason());
+                .addValue("maintenance_reason", vds.getMaintenanceReason())
+                .addValue("is_gluster_3_7_features_supported", 
vds.getGluster37Support());
 
         return parameterSource;
     }
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
index 8f7e169..41e08f5 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsGroupDAODbFacadeImpl.java
@@ -234,7 +234,8 @@
                 .addValue("hosts_with_broken_connectivity_threshold", 
group.getFencingPolicy().getHostsWithBrokenConnectivityThreshold())
                 .addValue("fencing_enabled", 
group.getFencingPolicy().isFencingEnabled())
                 .addValue("is_auto_converge", group.getAutoConverge())
-                .addValue("is_migrate_compressed", 
group.getMigrateCompressed());
+                .addValue("is_migrate_compressed", 
group.getMigrateCompressed())
+                .addValue("is_gluster_3_7_features_supported", 
group.getGluster37Support());
 
         return parameterSource;
     }
@@ -302,6 +303,7 @@
             
entity.getFencingPolicy().setFencingEnabled(rs.getBoolean("fencing_enabled"));
             entity.setAutoConverge((Boolean) rs.getObject("is_auto_converge"));
             entity.setMigrateCompressed((Boolean) 
rs.getObject("is_migrate_compressed"));
+            entity.setGluster37Support((Boolean) 
rs.getObject("is_gluster_3_7_features_supported"));
 
             return entity;
         }
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
index 300a427..9f15812 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -881,7 +881,7 @@
 GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Could not create ${snapname} for volume 
${glusterVolumeName}.
 CREATE_GLUSTER_BRICK=Brick ${brickName} created successfully.
 CREATE_GLUSTER_BRICK_FAILED=Failed to create brick ${brickName}.
-
+GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER=Host ${VdsName} is installed with 
Gluster version (${installedGlusterVersion}) and cannot join cluster 
${VdsGroupName} which is compatible with Gluster version 
${requiredGlusterVersion}.
 VDS_UNTRUSTED=Host ${VdsName} was set to non-operational. Host is not trusted 
by the attestation service.
 USER_ADDED_NETWORK_QOS=Network QoS ${QosName} was added. (User: ${UserName})
 USER_FAILED_TO_ADD_NETWORK_QOS=Failed to add Network QoS ${QosName}. (User: 
${UserName})
diff --git a/backend/manager/modules/dal/src/test/resources/fixtures.xml 
b/backend/manager/modules/dal/src/test/resources/fixtures.xml
index 7fc618e..b412c0a 100644
--- a/backend/manager/modules/dal/src/test/resources/fixtures.xml
+++ b/backend/manager/modules/dal/src/test/resources/fixtures.xml
@@ -795,6 +795,7 @@
         <column>is_auto_converge</column>
         <column>is_migrate_compressed</column>
         <column>maintenance_reason_required</column>
+        <column>is_gluster_3_7_features_supported</column>
         <row>
             <value>b399944a-81ab-4ec5-8266-e19ba7c3c9d1</value>
             <value>rhel6.iscsi</value>
@@ -827,6 +828,7 @@
             <value>true</value>
             <value>true</value>
             <value>false</value>
+            <value>false</value>
         </row>
         <row>
             <value>b399944a-81ab-4ec5-8266-e19ba7c3c9d2</value>
@@ -858,6 +860,7 @@
             <value>50</value>
             <value>true</value>
             <value>true</value>
+            <value>false</value>
             <value>false</value>
             <value>false</value>
         </row>
@@ -893,6 +896,7 @@
             <value>false</value>
             <value>true</value>
             <value>false</value>
+            <value>false</value>
         </row>
         <row>
             <value>0e57070e-2469-4b38-84a2-f111aaabd49d</value>
@@ -925,6 +929,7 @@
             <value>true</value>
             <null />
             <value>true</value>
+            <value>false</value>
             <value>false</value>
         </row>
         <row>
@@ -959,6 +964,7 @@
             <value>true</value>
             <null />
             <value>false</value>
+            <value>false</value>
         </row>
         <row>
             <value>eba797fb-8e3b-4777-b63c-92e7a5957d7d</value>
@@ -990,6 +996,7 @@
             <value>50</value>
             <value>false</value>
             <null />
+            <value>false</value>
             <value>false</value>
             <value>false</value>
         </row>
@@ -1025,6 +1032,7 @@
             <value>false</value>
             <null />
             <value>false</value>
+            <value>false</value>
         </row>
         <row>
             <value>eba797fb-8e3b-4777-b63c-92e7a5957d7f</value>
@@ -1057,6 +1065,7 @@
             <value>true</value>
             <null />
             <null />
+            <value>false</value>
             <value>false</value>
         </row>
         <row>
@@ -1091,6 +1100,7 @@
             <null />
             <null />
             <value>true</value>
+            <value>false</value>
         </row>
     </table>
 
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
index 610da89..4f6e10a 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java
@@ -74,6 +74,7 @@
 import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.common.utils.EnumUtils;
 import org.ovirt.engine.core.common.utils.Pair;
+import org.ovirt.engine.core.common.utils.RpmVersionUtils;
 import org.ovirt.engine.core.common.utils.SizeConverter;
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.compat.RpmVersion;
@@ -707,6 +708,12 @@
         } else {
             vds.setLiveMergeSupport(false);
         }
+        if (RpmVersionUtils.compareRpmParts(vds.getGlusterVersion().getMajor() 
+ "."
+                + vds.getGlusterVersion().getMinor(), "3.7") >= 0) {
+            vds.setGluster37Support(true);
+        } else {
+            vds.setGluster37Support(false);
+        }
     }
 
     private static void setRngSupportedSourcesToVds(VDS vds, Map<String, 
Object> xmlRpcStruct) {
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
index 78e3785..e48dbbc 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java
@@ -369,6 +369,7 @@
     public static final String MIGRATION_DOWNTIME = "downtime";
     public static final String AUTO_CONVERGE = "autoConverge";
     public static final String MIGRATE_COMPRESSED = "compressed";
+    public static final String GLUSTER3_7_SUPPORT = "gluster3_7Support";
 
     // storage domains
     public static final String code = "code";
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
index 2901b87..9b5f202 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
@@ -320,6 +320,7 @@
         obj.setFencingPolicy(new FencingPolicy(instance.getFencingPolicy()));
         obj.setAutoConverge(instance.getAutoConverge());
         obj.setMigrateCompressed(instance.getMigrateCompressed());
+        obj.setGluster37Support(instance.getGluster37Support());
 
         return obj;
     }
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
index fb2334b..bad52a8 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
@@ -46,6 +46,8 @@
 
     String NonOperationalReason___RNG_SOURCES_INCOMPATIBLE_WITH_CLUSTER();
 
+    String NonOperationalReason___GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER();
+
     String UsbPolicy___ENABLED_LEGACY();
 
     String UsbPolicy___ENABLED_NATIVE();
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
index bdd6c31..f12c2a1 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
+++ 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
@@ -19,6 +19,7 @@
 NonOperationalReason___UNINITIALIZED=Host is uninitialized as it is not 
attested yet.
 NonOperationalReason___ARCHITECTURE_INCOMPATIBLE_WITH_CLUSTER=Host's 
architecture doesn't match the Cluster's architecture.
 NonOperationalReason___NETWORK_INTERFACE_IS_DOWN=One or more interfaces 
required by one or more networks is down.
+NonOperationalReason___GLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER=Gluser 
version is incompatible with the cluster capabilities.
 UsbPolicy___ENABLED_LEGACY=Legacy
 UsbPolicy___DISABLED=Disabled
 UsbPolicy___ENABLED_NATIVE=Native
diff --git 
a/packaging/dbscripts/upgrade/03_06_1170_add_gluster_3_7_feature_support_flag_to_vds_group.sql
 
b/packaging/dbscripts/upgrade/03_06_1170_add_gluster_3_7_feature_support_flag_to_vds_group.sql
new file mode 100644
index 0000000..9c23363
--- /dev/null
+++ 
b/packaging/dbscripts/upgrade/03_06_1170_add_gluster_3_7_feature_support_flag_to_vds_group.sql
@@ -0,0 +1,2 @@
+select fn_db_add_column('vds_groups', 'is_gluster_3_7_features_supported', 
'BOOLEAN');
+select fn_db_add_column('vds_dynamic', 'is_gluster_3_7_features_supported', 
'BOOLEAN');
\ No newline at end of file
diff --git a/packaging/dbscripts/vds_groups_sp.sql 
b/packaging/dbscripts/vds_groups_sp.sql
index 397f15f..89b31b5 100644
--- a/packaging/dbscripts/vds_groups_sp.sql
+++ b/packaging/dbscripts/vds_groups_sp.sql
@@ -43,7 +43,8 @@
     v_hosts_with_broken_connectivity_threshold SMALLINT,
     v_fencing_enabled BOOLEAN,
     v_is_auto_converge BOOLEAN,
-    v_is_migrate_compressed BOOLEAN
+    v_is_migrate_compressed BOOLEAN,
+    v_is_gluster_3_7_features_supported BOOLEAN
 )
 RETURNS VOID
    AS $procedure$
@@ -51,11 +52,11 @@
       INSERT INTO vds_groups(vds_group_id,description, name, 
free_text_comment, cpu_name, storage_pool_id,  max_vds_memory_over_commit, 
count_threads_as_cores, compatibility_version,
         transparent_hugepages, migrate_on_error, virt_service, 
gluster_service, tunnel_migration, emulated_machine, detect_emulated_machine, 
trusted_service, ha_reservation, optional_reason, maintenance_reason_required, 
cluster_policy_id,
         cluster_policy_custom_properties, enable_balloon, architecture, 
optimization_type, spice_proxy, enable_ksm, serial_number_policy, 
custom_serial_number, required_rng_sources, skip_fencing_if_sd_active, 
skip_fencing_if_connectivity_broken, hosts_with_broken_connectivity_threshold, 
fencing_enabled,
-        is_auto_converge, is_migrate_compressed)
+        is_auto_converge, is_migrate_compressed, 
is_gluster_3_7_features_supported)
     VALUES(v_vds_group_id,v_description, v_name, v_free_text_comment, 
v_cpu_name, v_storage_pool_id,  v_max_vds_memory_over_commit, 
v_count_threads_as_cores, v_compatibility_version,
     v_transparent_hugepages, v_migrate_on_error, v_virt_service, 
v_gluster_service, v_tunnel_migration, v_emulated_machine, 
v_detect_emulated_machine, v_trusted_service, v_ha_reservation, 
v_optional_reason, v_maintenance_reason_required, v_cluster_policy_id, 
v_cluster_policy_custom_properties, v_enable_balloon,
     v_architecture, v_optimization_type, v_spice_proxy, v_enable_ksm, 
v_serial_number_policy, v_custom_serial_number, v_required_rng_sources, 
v_skip_fencing_if_sd_active, v_skip_fencing_if_connectivity_broken, 
v_hosts_with_broken_connectivity_threshold, v_fencing_enabled,
-    v_is_auto_converge, v_is_migrate_compressed);
+    v_is_auto_converge, v_is_migrate_compressed, 
v_is_gluster_3_7_features_supported);
 END; $procedure$
 LANGUAGE plpgsql;
 
@@ -98,7 +99,8 @@
     v_hosts_with_broken_connectivity_threshold SMALLINT,
     v_fencing_enabled BOOLEAN,
     v_is_auto_converge BOOLEAN,
-    v_is_migrate_compressed BOOLEAN
+    v_is_migrate_compressed BOOLEAN,
+    v_is_gluster_3_7_features_supported BOOLEAN
 )
 RETURNS VOID
 
@@ -123,7 +125,8 @@
       hosts_with_broken_connectivity_threshold = 
v_hosts_with_broken_connectivity_threshold,
       fencing_enabled = v_fencing_enabled,
       is_auto_converge = v_is_auto_converge,
-      is_migrate_compressed = v_is_migrate_compressed
+      is_migrate_compressed = v_is_migrate_compressed,
+      is_gluster_3_7_features_supported = v_is_gluster_3_7_features_supported
       WHERE vds_group_id = v_vds_group_id;
 END; $procedure$
 LANGUAGE plpgsql;


-- 
To view, visit https://gerrit.ovirt.org/39756
To unsubscribe, visit https://gerrit.ovirt.org/settings

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

Reply via email to