Tal Nisan has uploaded a new change for review.

Change subject: core: Added storage pool name to VDS non operational log 
(#854210)
......................................................................

core: Added storage pool name to VDS non operational log (#854210)

Added storage pool name to the storage domain not accessible audit log
in SetVDSNonOperational command

Bug-Url: https://bugzilla.redhat.com/854210

Change-Id: I18abfa25c762a19bb65f65d62b310fe22bea1aaf
Signed-off-by: Tal Nisan <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
M 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
2 files changed, 11 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/8306/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 b11de06..208b28d 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
@@ -1,7 +1,9 @@
 package org.ovirt.engine.core.bll;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 import org.ovirt.engine.core.bll.job.ExecutionHandler;
 import org.ovirt.engine.core.bll.storage.StorageHandlingCommandBase;
@@ -76,7 +78,8 @@
             processFencing();
             processStoragePoolStatus();
         } else {
-            setNonOperational(NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE);
+            Map<String, String> customLogValues = 
Collections.singletonMap("StoragePoolName", getStoragePoolName());
+            setNonOperational(NonOperationalReason.STORAGE_DOMAIN_UNREACHABLE, 
customLogValues);
         }
     }
 
@@ -103,8 +106,9 @@
         }
     }
 
-    private void setNonOperational(NonOperationalReason reason) {
-        SetNonOperationalVdsParameters tempVar = new 
SetNonOperationalVdsParameters(getVds().getId(), reason);
+    private void setNonOperational(NonOperationalReason reason, Map<String, 
String> customLogValues) {
+        SetNonOperationalVdsParameters tempVar =
+                new SetNonOperationalVdsParameters(getVds().getId(), reason, 
customLogValues);
         tempVar.setSaveToDb(true);
         
Backend.getInstance().runInternalAction(VdcActionType.SetNonOperationalVds, 
tempVar,  ExecutionHandler.createInternalJobContext());
     }
@@ -243,10 +247,10 @@
             if (upServer != null) {
                 List<GlusterServerInfo> glusterServers = 
getGlusterPeers(upServer.getId());
                 if (glusterServers.size() == 0) {
-                    
setNonOperational(NonOperationalReason.GLUSTER_PEER_LIST_FAILED);
+                    
setNonOperational(NonOperationalReason.GLUSTER_PEER_LIST_FAILED, null);
                 } else if (!hostExists(glusterServers, getVds())) {
                     if (!glusterPeerProbe(upServer.getId(), 
getVds().gethost_name())) {
-                        
setNonOperational(NonOperationalReason.GLUSTER_PEER_PROBE_FAILED);
+                        
setNonOperational(NonOperationalReason.GLUSTER_PEER_PROBE_FAILED, null);
                     }
                 }
             }
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 7c8c453..ac38ac5 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -448,8 +448,8 @@
 NETWORK_HOST_MISSING_CLUSER_VLAN=${VdsName} is missing vlan id: 
${VlanIdCluster} that is expected by the cluster
 SYSTEM_DEACTIVATED_STORAGE_DOMAIN=Storage Domain ${StorageDomainName} (Data 
Center ${StoragePoolName}) was deactivated by system because it's not visible 
by any of the hosts. 
 SYSTEM_DEACTIVATE_STORAGE_DOMAIN_FAILED=Failed to deactivate Storage Domain 
${StorageDomainName} (Data Center ${StoragePoolName}). 
-VDS_SET_NONOPERATIONAL_DOMAIN=Host ${VdsName} cannot access one of the Storage 
Domains attached to it, or the Data Center object. Setting Host state to 
Non-Operational.
-VDS_SET_NONOPERATIONAL_DOMAIN_FAILED=Host ${VdsName} cannot access one of the 
Storage Domains attached to it, or the Data Center object. Failed to set Host 
state to Non-Operational.
+VDS_SET_NONOPERATIONAL_DOMAIN=Host ${VdsName} cannot access one of the Storage 
Domains attached to the Data Center ${StoragePoolName}. Setting Host state to 
Non-Operational.
+VDS_SET_NONOPERATIONAL_DOMAIN_FAILED=Host ${VdsName} cannot access one of the 
Storage Domains attached to the Data Center ${StoragePoolName}. Failed to set 
Host state to Non-Operational.
 VDS_DOMAIN_DELAY_INTERVAL=Storage domain ${StorageDomainName} experienced a 
high latency of ${Delay} seconds from host ${VdsName}. This may cause 
performance and functional issues. Please consult your Storage Administrator.
 USER_EXTENDED_STORAGE_DOMAIN=Storage ${StorageDomainName} was Extended by 
${UserName}
 USER_EXTENDED_STORAGE_DOMAIN_FAILED=Failed to extend Storage Domain 
${StorageDomainName}. (User: ${UserName})


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

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

Reply via email to