Eli Mesika has uploaded a new change for review.

Change subject: core: adding event when host is reconnecting.
......................................................................

core: adding event when host is reconnecting.

This patch adds a audit log message when host lost connectivity and is
trying to reconnect.

Change-Id: I68a9b16564d1bd8f0bb09e1b8bf6afe02baae424
Bug_url: https://bugzilla.redhat.com/show_bug.cgi?id=1167286
Signed-off-by: emesika <emes...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
3 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/05/36405/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 0382735..dd62e9a 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
@@ -926,7 +926,7 @@
     FENCE_OPERATION_FAILED(9019, AuditLogSeverity.ERROR),
     FENCE_USING_AGENT_AND_PROXY_HOST(9020),
     FENCE_OPERATION_FAILED_USING_PROXY(9021, AuditLogSeverity.WARNING),
-
+    VDS_HOST_RECONNECTING(9022, AuditLogSeverity.WARNING, 
AuditLogTimeInterval.MINUTE.getValue() * 3),
 
     TASK_STOPPING_ASYNC_TASK(9500, AuditLogTimeInterval.MINUTE.getValue()),
     TASK_CLEARING_ASYNC_TASK(9501, AuditLogTimeInterval.MINUTE.getValue()),
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 a4896a8..95aea66 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -637,6 +637,7 @@
 VDS_ALERT_NOT_RESTARTED_DUE_TO_POLICY=Host ${VdsName} became non responsive 
and was not restarted due to the Cluster Fencing Policy.
 VDS_ALERT_FENCE_DISABLED_BY_CLUSTER_POLICY=Host ${VdsName} became Non 
Responsive and was not restarted due to disabled fencing in the Cluster Fencing 
Policy.
 VDS_HOST_NOT_RESPONDING_CONNECTING=Host ${VdsName} is not responding. It will 
stay in Connecting state for a grace period of ${Seconds} seconds and after 
that an attempt to fence the host will be issued.
+VDS_HOST_RECONNECTING=Communication to Host ${VdsName} is problematic, trying 
to reconnect...
 TASK_STOPPING_ASYNC_TASK=Stopping async task ${CommandName} that started at 
${Date}
 REFRESH_REPOSITORY_IMAGE_LIST_FAILED=Refresh image list failed for domain(s): 
${imageDomains}. Please check domain activity.
 REFRESH_REPOSITORY_IMAGE_LIST_SUCCEEDED=Refresh image list succeeded for 
domain(s): ${imageDomains}
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 3dc4a41..3fdedc0 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
@@ -701,6 +701,8 @@
                         && cachedVds.getStatus() != 
VDSStatus.PreparingForMaintenance
                         && cachedVds.getStatus() != VDSStatus.NonResponsive) {
                     setStatus(VDSStatus.Connecting, cachedVds);
+                    AuditLogableBase auditLogableBase = new 
AuditLogableBase(cachedVds.getId());
+                    AuditLogDirector.log(auditLogableBase, 
AuditLogType.VDS_HOST_RECONNECTING);
                 } else {
                     saveToDb = false;
                 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68a9b16564d1bd8f0bb09e1b8bf6afe02baae424
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
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