Roy Golan has uploaded a new change for review.

Change subject: core: Add new NonOperational reason for cluster emulation mode
......................................................................

core: Add new NonOperational reason for cluster emulation mode

According to http://www.ovirt.org/Cluster_emulation_modes,

This new REASON if for host which can't join the cluster becuase they
don't comply with the Config ClusterEmulatedMachines or the clusters
emulatedMachine field which is a subset of the config

Signed-off-by: Roy Golan <rgo...@redhat.com>
Change-Id: I20ab70f57fed145fc98f69b687358ce7b68c4435
---
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/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
M 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
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
7 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/66/15866/1

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 8e91036..ebaf270 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
@@ -114,6 +114,8 @@
             return 
AuditLogType.VDS_SET_NON_OPERATIONAL_VM_NETWORK_IS_BRIDGELESS;
         case GLUSTER_COMMAND_FAILED:
             return AuditLogType.GLUSTER_COMMAND_FAILED;
+        case EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER:
+            return AuditLogType.EMULATED_MACHINES_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 4e57c21..5772867 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
@@ -721,6 +721,7 @@
     IMPORTEXPORT_IMPORT_VM_INVALID_INTERFACES(9600, 
AuditLogTimeInterval.MINUTE.getValue()),
     VDS_SET_NON_OPERATIONAL_VM_NETWORK_IS_BRIDGELESS(9601, 
AuditLogTimeInterval.MINUTE.getValue()),
 
+    EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER(9603, 
AuditLogTimeInterval.SECOND.getValue()),
 
     /**
     * A highly available virtual machine went down.
@@ -744,8 +745,7 @@
     EXTERNAL_ALERT(9804),
 
     //watchdog
-    WATCHDOG_EVENT(9901),
-    ;
+    WATCHDOG_EVENT(9901);
 
     private int intValue;
     // indicates time interval in seconds on which identical events from same 
instance are supressed.
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 b2536b8..7357475 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
@@ -15,7 +15,7 @@
     TIMEOUT_RECOVERING_FROM_CRASH(7),
     VM_NETWORK_IS_BRIDGELESS(8),
     GLUSTER_COMMAND_FAILED(9),
-    ;
+    EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER(10);
 
     private final int value;
 
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
index 0f2c466..2eab828 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
@@ -338,6 +338,7 @@
         severities.put(AuditLogType.VDS_ACTIVATE_ASYNC, 
AuditLogSeverity.NORMAL);
         severities.put(AuditLogType.VDS_ACTIVATE_FAILED_ASYNC, 
AuditLogSeverity.NORMAL);
         
severities.put(AuditLogType.VDS_SET_NON_OPERATIONAL_VM_NETWORK_IS_BRIDGELESS, 
AuditLogSeverity.WARNING);
+        
severities.put(AuditLogType.EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER, 
AuditLogSeverity.WARNING);
         severities.put(AuditLogType.VDS_TIME_DRIFT_ALERT, 
AuditLogSeverity.WARNING);
         severities.put(AuditLogType.PROXY_HOST_SELECTION, 
AuditLogSeverity.NORMAL);
     }
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 84eeda0..93bf039 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -559,6 +559,7 @@
 IMPORTEXPORT_IMPORT_VM_INVALID_INTERFACES=While importing VM ${VmName}, the 
Network/s ${Networks} were found to be Non-VM Networks or do not exist in 
Cluster. Network Name was not set in the Interface/s ${Interfaces}.
 IMPORTEXPORT_IMPORT_TEMPLATE_INVALID_INTERFACES=While importing Template 
${VmTemplateName}, the Network/s ${Networks} were found to be Non-VM Networks 
or do not exist in Cluster. Network Name was not set in the Interface/s 
${Interfaces}.
 VDS_SET_NON_OPERATIONAL_VM_NETWORK_IS_BRIDGELESS=Host ${VdsName} does not 
comply with the cluster ${VdsGroupName} networks, the following VM networks are 
non-VM networks: '${Networks}'
+EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER=Host ${VdsName} does not comply 
with the cluster ${VdsGroupName} emulated machines. The Hosts emulated machines 
are ${hostSupportedEmulatedMachines} and the cluster is 
${clusterEmulatedMachines}}
 # Gluster Messages
 GLUSTER_VOLUME_CREATE=Gluster Volume ${glusterVolumeName} created.
 GLUSTER_VOLUME_CREATE_FAILED=Creation of Gluster Volume ${glusterVolumeName} 
failed.
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 c836489..e231940 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
@@ -24,6 +24,8 @@
 
     String NonOperationalReason___GLUSTER_COMMAND_FAILED();
 
+    String 
NonOperationalReason___EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER();
+
        String VmPauseStatus___NONE();
 
        String VmPauseStatus___NOERR();
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 13d9264..63dc96c 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
@@ -8,6 +8,7 @@
 NonOperationalReason___KVM_NOT_RUNNING=KVM is not running on the Host.
 NonOperationalReason___TIMEOUT_RECOVERING_FROM_CRASH=Timeout connecting to 
Host.
 NonOperationalReason___GLUSTER_COMMAND_FAILED=Gluster command failed on server.
+NonOperationalReason___EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER=The Host 
emulated machine flags doesn't match one of the cluster emulated machines.
 VmPauseStatus___NONE=None
 VmPauseStatus___NOERR=No Error
 VmPauseStatus___EOTHER=VM has been paused due to a storage error


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

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

Reply via email to