use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class ClusterOperationCommandBase method alertIfFencingDisabled.
protected void alertIfFencingDisabled() {
if (!getCluster().getFencingPolicy().isFencingEnabled()) {
AuditLogable alb = new AuditLogableImpl();
alb.setClusterId(getCluster().getId());
alb.setClusterName(getCluster().getName());
alb.setRepeatable(true);
auditLogDirector.log(alb, AuditLogType.FENCE_DISABLED_IN_CLUSTER_POLICY);
}
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class GetVmsFromExportDomainQuery method auditLogOvfLoadError.
private void auditLogOvfLoadError(String machineName, String errorMessage) {
AuditLogable logable = new AuditLogableImpl();
logable.addCustomValue("ImportedVmName", machineName).addCustomValue("ErrorMessage", errorMessage);
auditLogDirector.log(logable, AuditLogType.IMPORTEXPORT_FAILED_TO_IMPORT_VM);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class VdsCommand method logSettingVmToDown.
protected void logSettingVmToDown(VM vm) {
AuditLogable logable = new AuditLogableImpl();
logable.setVdsName(getVds().getName());
logable.setVdsId(getVds().getId());
logable.setVmName(vm.getName());
logable.setVmId(vm.getId());
auditLogDirector.log(logable, AuditLogType.VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE);
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class VdsEventListener method createVmEvent.
private AuditLogable createVmEvent(Guid vmId, AuditLogType logType) {
AuditLogable event = new AuditLogableImpl();
event.setVmName(vmStaticDao.get(vmId).getName());
event.setVmId(vmId);
auditLogDirector.log(event, logType);
return event;
}
use of org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableImpl in project ovirt-engine by oVirt.
the class VmPoolMonitor method runVmFromPool.
/**
* Run the given VM as stateless.
*/
private boolean runVmFromPool(VmStatic vmToRun, boolean runAsStateless, String poolName) {
log.info("Running VM '{}' as {}", vmToRun.getName(), runAsStateless ? "stateless" : "stateful");
RunVmParams runVmParams = new RunVmParams(vmToRun.getId());
runVmParams.setEntityInfo(new EntityInfo(VdcObjectType.VM, vmToRun.getId()));
runVmParams.setRunAsStateless(runAsStateless);
ActionReturnValue actionReturnValueurnValue = Backend.getInstance().runInternalAction(ActionType.RunVm, runVmParams, ExecutionHandler.createInternalJobContext().withLock(vmPoolHandler.createLock(vmToRun.getId())));
boolean prestartingVmSucceeded = actionReturnValueurnValue.getSucceeded();
if (!prestartingVmSucceeded) {
AuditLogable log = new AuditLogableImpl();
log.addCustomValue("VmPoolName", poolName);
Injector.get(AuditLogDirector.class).log(log, AuditLogType.VM_FAILED_TO_PRESTART_IN_POOL);
}
log.info("Running VM '{}' as {} {}", vmToRun.getName(), runAsStateless ? "stateless" : "stateful", prestartingVmSucceeded ? "succeeded" : "failed");
return prestartingVmSucceeded;
}
Aggregations