Eli Mesika has uploaded a new change for review.

Change subject: core: fixing a missing fencing audit log message
......................................................................

core: fixing a missing fencing audit log message

This patch fixes the message to the audit log where the Host is set to 
Connecting state.

The patches addresses
1) fix the audit log key from VDS_HOST_IN_CONNECTING_STATE which had no
message to VDS_HOST_NOT_RESPONDING_CONNECTING
2) add a flood rate to this audit log such that it will not logged in
each network exception event
3) fix a minor issue in the regular engine log ( ${1} => {1} )

Change-Id: I33b683664a33fa27df283e0abc448eb6564b678e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1070674
Signed-off-by: Eli Mesika <emes...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/52/31952/1

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 d02d390..4673561 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
@@ -896,7 +896,7 @@
     VDS_ALERT_FENCE_STATUS_VERIFICATION_FAILED(9005, AuditLogSeverity.ALERT),
     CANNOT_HIBERNATE_RUNNING_VMS_AFTER_CLUSTER_CPU_UPGRADE(9006, 
AuditLogSeverity.WARNING),
     VDS_ALERT_SECONDARY_AGENT_USED_FOR_FENCE_OPERATION(9007, 
AuditLogSeverity.ALERT),
-    VDS_HOST_IN_CONNECTING_STATE(9008, AuditLogSeverity.WARNING),
+    VDS_HOST_NOT_RESPONDING_CONNECTING(9008, AuditLogSeverity.WARNING, 
AuditLogTimeInterval.MINUTE.getValue() * 3),
     VDS_ALERT_PM_HEALTH_CHECK_FAILED_FOR_SEQ_PRIMARY_AGENT(9009, 
AuditLogSeverity.ALERT),
     VDS_ALERT_PM_HEALTH_CHECK_FAILED_FOR_SEQ_SECONDARY_AGENT(9010, 
AuditLogSeverity.ALERT),
     VDS_ALERT_PM_HEALTH_CHECK_FAILED_FOR_CON_PRIMARY_AGENT(9011, 
AuditLogSeverity.ALERT),
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
index 2a2413a..750a029 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
@@ -672,13 +672,13 @@
     public boolean handleNetworkException(VDSNetworkException ex, VDS vds) {
         if (vds.getStatus() != VDSStatus.Down) {
             long timeoutToFence = calcTimeoutToFence(vds.getVmCount(), 
vds.getSpmStatus());
-            log.warnFormat("Host {0} is not responding. It will stay in 
Connecting state for a grace period of ${1} seconds and after that an attempt 
to fence the host will be issued.",
+            log.warnFormat("Host {0} is not responding. It will stay in 
Connecting state for a grace period of {1} seconds and after that an attempt to 
fence the host will be issued.",
                 vds.getName(),
                 TimeUnit.MILLISECONDS.toSeconds(timeoutToFence));
             AuditLogableBase logable = new AuditLogableBase();
             logable.setVdsId(vds.getId());
             logable.addCustomValue("Seconds", 
Long.toString(TimeUnit.MILLISECONDS.toSeconds(timeoutToFence)));
-            AuditLogDirector.log(logable, 
AuditLogType.VDS_HOST_IN_CONNECTING_STATE);
+            AuditLogDirector.log(logable, 
AuditLogType.VDS_HOST_NOT_RESPONDING_CONNECTING);
             if (mUnrespondedAttempts.get() < Config.<Integer> 
getValue(ConfigValues.VDSAttemptsToResetCount)
                     || (lastUpdate + timeoutToFence) > 
System.currentTimeMillis()) {
                 boolean result = false;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33b683664a33fa27df283e0abc448eb6564b678e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to