Alona Kaplan has uploaded a new change for review. Change subject: engine: Extended error for pinned host missing non required network (wip) ......................................................................
engine: Extended error for pinned host missing non required network (wip) There are a lot of reasons for a vm pinned to host to fail running. The old message specified just a small amount of them. The message was fixed to display the exact reason for which the vm failed to run. Change-Id: Ibf9703ae06b06be96c6508d48306d8bd6b8bcfbb Bug-Url: https://bugzilla.redhat.com/878451 Signed-off-by: Alona Kaplan <alkap...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 6 files changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/38/11338/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java index 93897cd..6f01521 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java @@ -110,7 +110,10 @@ // object and action type and we don't want to override them, // we do override any previous message because this one has priority. if (messages.size() > 2) { - messages.set(2, VdcBllMessages.VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS.toString()); + messages.add(2, + VdcBllMessages.VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS_WITH_REASON.toString()); + messages.set(3, "$reason ".concat(messages.get(3))); + } else { messages.add(VdcBllMessages.VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS.toString()); } diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java index f61dfc2..f19db32 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java @@ -541,6 +541,7 @@ ACTION_TYPE_FAILED_VM_CANNOT_BE_HIGHLY_AVAILABLE_AND_PINNED_TO_HOST, ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_AND_MIGRATABLE, VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS, + VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS_WITH_REASON, VM_HOSTCPU_MUST_BE_PINNED_TO_HOST, ACTION_TYPE_FAILED_STORAGE_POOL_IS_NOT_LOCAL, diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index bf8c664..fa0ce9c 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -154,6 +154,7 @@ VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n\ Invalid Host status or not enough free resources on it.\n\ You may free resources on the Host by migrating other VMs. +VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS_WITH_REASON = Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n${reason} VM_HOSTCPU_MUST_BE_PINNED_TO_HOST=Cannot ${action} ${type}. VM with host cpu flags must be pinned to host. ACTION_TYPE_FAILED_VM_NOT_EXIST=Cannot ${action} ${type}. VM doesn't exist. ACTION_TYPE_FAILED_VM_ALREADY_EXIST=Cannot ${action} ${type}. VM with the same name already exists. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index 235cc68..3ad5254 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -386,6 +386,9 @@ @DefaultStringValue("Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\nInvalid Host status or not enough free resources on it.\nYou may:\n- Run the VM on another Host manually (using Run Once).\n- Free resources on the Host by migrating other VMs.") String VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS(); + @DefaultStringValue("Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n${reason}") + String VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS_WITH_REASON(); + @DefaultStringValue("CPU pinning format invalid.") String VM_PINNING_FORMAT_INVALID(); diff --git a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index 5e4970d..c3065cd 100644 --- a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -152,6 +152,7 @@ VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n\ Invalid Host status or not enough free resources on it.\n\ You may free resources on the Host by migrating other VMs. +VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS_WITH_REASON = Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n${reason} VM_HOSTCPU_MUST_BE_PINNED_TO_HOST=Cannot ${action} ${type}. VM with host cpu flags must be pinned to host. ACTION_TYPE_FAILED_VM_NOT_EXIST=Cannot ${action} ${type}. VM doesn't exist. ACTION_TYPE_FAILED_VM_ALREADY_EXIST=Cannot ${action} ${type}. VM with the same name already exists. diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index d60ce36..66c3385 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -151,6 +151,7 @@ VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n\ Invalid Host status or not enough free resources on it.\n\ You may free resources on the Host by migrating other VMs. +VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS_WITH_REASON = Cannot ${action} ${type}. VM is pinned to a specific Host but cannot run on it due to:\n${reason} VM_HOSTCPU_MUST_BE_PINNED_TO_HOST=Cannot ${action} ${type}. VM with host cpu flags must be pinned to host. ACTION_TYPE_FAILED_VM_NOT_EXIST=Cannot ${action} ${type}. VM doesn't exist. ACTION_TYPE_FAILED_VM_ALREADY_EXIST=Cannot ${action} ${type}. VM with the same name already exists. -- To view, visit http://gerrit.ovirt.org/11338 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf9703ae06b06be96c6508d48306d8bd6b8bcfbb Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches