Shahar Havivi has uploaded a new change for review. Change subject: Engine: Migration target host labeled UNKNOWN ......................................................................
Engine: Migration target host labeled UNKNOWN When we don't find a destination host to migrate to we cannot use the regular fail message since it expected destination host name for the audit log message. Change-Id: I7d2819454d4642632ae5cfff7ba83424b9dd8aa4 Bug-Url: https://bugzilla.redhat.com/965617 Signed-off-by: Shahar Havivi <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties 4 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/87/20187/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java index 229fbb7..a8ad7e4 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java @@ -252,7 +252,8 @@ AuditLogType.VM_MIGRATION_TRYING_RERUN : getVds().getStatus() == VDSStatus.PreparingForMaintenance ? AuditLogType.VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTENANCE - : AuditLogType.VM_MIGRATION_FAILED; + : getDestinationVds() == null ? AuditLogType.VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON : + AuditLogType.VM_MIGRATION_FAILED; } protected Guid getVdsDestinationId() { 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 1f43262..2b353a8 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 @@ -368,6 +368,7 @@ VM_MIGRATION_DONE(63), VM_MIGRATION_ABORT(64), VM_MIGRATION_FAILED(65), + VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON(166), VM_FAILURE(66), VM_MIGRATION_START_SYSTEM_INITIATED(67), VM_MIGRATION_FAILED_FROM_TO(120), diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java index 75a0249..5c79d8c 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java @@ -524,7 +524,8 @@ severities.put(AuditLogType.VM_IMPORT_INFO, AuditLogSeverity.NORMAL); severities.put(AuditLogType.VM_NOT_RESPONDING, AuditLogSeverity.WARNING); severities.put(AuditLogType.VM_STATUS_RESTORED, AuditLogSeverity.NORMAL); - severities.put(AuditLogType.VM_MIGRATION_TRYING_RERUN, AuditLogSeverity.WARNING); + severities.put(AuditLogType.VM_MIGRATION_TRYING_RERUN, AuditLogSeverity.ERROR); + severities.put(AuditLogType.VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON, AuditLogSeverity.WARNING); severities.put(AuditLogType.VM_PAUSED_ENOSPC, AuditLogSeverity.ERROR); severities.put(AuditLogType.VM_PAUSED_ERROR, AuditLogSeverity.ERROR); severities.put(AuditLogType.VM_PAUSED_EIO, AuditLogSeverity.ERROR); 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 f80fd39..6f54da1 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -218,6 +218,7 @@ VM_MIGRATION_ABORT=Migration failed: ${MigrationError} (VM: ${VmName}, Source: ${VdsName}, Destination: ${VdsDestination}). VM_MIGRATION_DONE=Migration completed (VM: ${VmName}, Source: ${VdsName}, Destination: ${VdsDestination}, Duration: ${Duration} sec). VM_MIGRATION_FAILED=Migration failed${DueToMigrationError} (VM: ${VmName}, Source: ${VdsName}, Destination: ${VdsDestination}). +VM_MIGRATION_FAILED_NO_VDS_TO_RUN_ON=Migration failed, No available host found (VM: ${VmName}, Source: ${VdsName}). VM_MIGRATION_FAILED_DURING_MOVE_TO_MAINTENANCE=Migration failed${DueToMigrationError} while Host is in 'preparing for maintenance' state.\n Consider manual intervention\: stopping/migrating Vms as Host's state will not\n turn to maintenance while VMs are still running on it.(VM: ${VmName}, Source: ${VdsName}, Destination: ${VdsDestination}). VM_SET_TO_UNKNOWN_STATUS=VM ${VmName} was set to the Unknown status. VM_MIGRATION_FAILED_FROM_TO=Migration failed${DueToMigrationError} (VM: ${VmName}, Source: ${VdsName}, Destination: ${VdsDestination}). -- To view, visit http://gerrit.ovirt.org/20187 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d2819454d4642632ae5cfff7ba83424b9dd8aa4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
