Martin Peřina has uploaded a new change for review.

Change subject: core: Show warning when kdump integration required but not 
configured
......................................................................

core: Show warning when kdump integration required but not configured

Show warning when updating host configuration if PM and kdump
integration are enabled, but VDSM doesn't report kdump status as
enabled.

Change-Id: I1c9a89daa1a106206bf581bb0f996bb84c203cfa
Bug-Url: https://bugzilla.redhat.com/1126854
Signed-off-by: Martin Perina <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/02/31802/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
index 8eb7f31..bb2d719 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
@@ -14,9 +14,12 @@
 import org.ovirt.engine.core.common.action.VdcActionType;
 import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import 
org.ovirt.engine.core.common.action.VdsOperationActionParameters.AuthenticationMethod;
+import org.ovirt.engine.core.common.businessentities.KdumpStatus;
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VDSStatus;
 import org.ovirt.engine.core.common.businessentities.VDSType;
+import org.ovirt.engine.core.common.businessentities.VdsDynamic;
+import org.ovirt.engine.core.common.businessentities.VdsStatic;
 import org.ovirt.engine.core.common.businessentities.network.Network;
 import org.ovirt.engine.core.common.businessentities.network.NetworkCluster;
 import org.ovirt.engine.core.common.config.Config;
@@ -26,6 +29,7 @@
 import org.ovirt.engine.core.common.validation.group.UpdateEntity;
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.dal.dbbroker.DbFacade;
+import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector;
 import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase;
 import org.ovirt.engine.core.utils.transaction.TransactionMethod;
 import org.ovirt.engine.core.utils.transaction.TransactionSupport;
@@ -207,6 +211,7 @@
         }
         
AlertIfPowerManagementNotConfigured(getParameters().getVdsStaticData());
         TestVdsPowerManagementStatus(getParameters().getVdsStaticData());
+        checkKdumpIntegrationStatus();
         setSucceeded(true);
     }
 
@@ -262,4 +267,16 @@
         logable.setVdsId(_oldVds.getId());
     }
 
+    private void checkKdumpIntegrationStatus() {
+        VdsStatic vdsSt = getParameters().getVdsStaticData();
+        if (vdsSt.isPmEnabled() && vdsSt.isPmKdumpDetection()) {
+            VdsDynamic vdsDyn = 
getDbFacade().getVdsDynamicDao().get(vdsSt.getId());
+            if (vdsDyn != null && vdsDyn.getKdumpStatus() != 
KdumpStatus.ENABLED) {
+                AuditLogDirector.log(
+                        new AuditLogableBase(vdsSt.getId()),
+                        AuditLogType.KDUMP_DETECTION_NOT_CONFIGURED_ON_VDS
+                );
+            }
+        }
+    }
 }


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

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

Reply via email to