Martin Sivák has uploaded a new change for review. Change subject: core: Use proper message when scheduling fails with not enough cores ......................................................................
core: Use proper message when scheduling fails with not enough cores Leftover from scheduling reporting refactoring, the CPUPolicyUnit still used the old error message style. This updates it to the new mechanism. Change-Id: Ibf9247ecded75bb4c4a3bd8e8a7bd23e11ac670b Bug-Url: https://bugzilla.redhat.com/1129542 Signed-off-by: Martin Sivak <msi...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties 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 5 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/31982/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java index bcf9f74..ee61641 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/policyunits/CPUPolicyUnit.java @@ -24,7 +24,7 @@ for (VDS vds : hosts) { Integer cores = SlaValidator.getInstance().getEffectiveCpuCores(vds); if (cores != null && vm.getNumOfCpus() > cores) { - messages.addMessage(vds.getId(), VdcBllMessages.ACTION_TYPE_FAILED_VDS_VM_CPUS.toString()); + messages.addMessage(vds.getId(), VdcBllMessages.VAR__DETAIL__NOT_ENOUGH_CORES.toString()); log.debugFormat("host {0} has less cores ({1}) than vm cores ({2})", vds.getName(), cores, diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java index 84c868b..04df1d3 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java @@ -1007,6 +1007,7 @@ VAR__DETAIL__LOW_CPU_LEVEL, VAR__DETAIL__SWAP_VALUE_ILLEGAL, VAR__DETAIL__NOT_ENOUGH_MEMORY, + VAR__DETAIL__NOT_ENOUGH_CORES, SCHEDULING_NO_HOSTS, SCHEDULING_HOST_FILTERED_REASON, SCHEDULING_HOST_FILTERED_REASON_WITH_DETAIL, 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 4919d97..f649941 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -1215,6 +1215,7 @@ VAR__DETAIL__LOW_CPU_LEVEL=$detailMessage its CPU level ${hostCPULevel} is lower than the VM requires ${vmCPULevel} VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal VAR__DETAIL__NOT_ENOUGH_MEMORY=$detailMessage it has insufficient free memory to run the VM +VAR__DETAIL__NOT_ENOUGH_CORES=$detailMessage it does not have enough cores to run the VM SCHEDULING_NO_HOSTS=There are no hosts to use. Check that the cluster contains at least one host in Up state. VAR__FILTERTYPE__EXTERNAL=$filterType external VAR__FILTERTYPE__INTERNAL=$filterType internal 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 bac5980..19fef80 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 @@ -1012,6 +1012,7 @@ VAR__DETAIL__LOW_CPU_LEVEL=$detailMessage its CPU level ${hostCPULevel} is lower than the VM requires ${vmCPULevel} VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal VAR__DETAIL__NOT_ENOUGH_MEMORY=$detailMessage it has insufficient free memory to run the VM +VAR__DETAIL__NOT_ENOUGH_CORES=$detailMessage it does not have enough cores to run the VM SCHEDULING_NO_HOSTS=There are no hosts to use. Check that the cluster contains at least one host in Up state. VAR__FILTERTYPE__EXTERNAL=$filterType external VAR__FILTERTYPE__INTERNAL=$filterType internal 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 3248460..a982fec 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 @@ -1181,6 +1181,7 @@ VAR__DETAIL__LOW_CPU_LEVEL=$detailMessage its CPU level ${hostCPULevel} is lower than the VM requires ${vmCPULevel} VAR__DETAIL__SWAP_VALUE_ILLEGAL=$detailMessage its swap value was illegal VAR__DETAIL__NOT_ENOUGH_MEMORY=$detailMessage it has insufficient free memory to run the VM +VAR__DETAIL__NOT_ENOUGH_CORES=$detailMessage it does not have enough cores to run the VM SCHEDULING_NO_HOSTS=There are no hosts to use. Check that the cluster contains at least one host in Up state. VAR__FILTERTYPE__EXTERNAL=$filterType external VAR__FILTERTYPE__INTERNAL=$filterType internal -- To view, visit http://gerrit.ovirt.org/31982 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf9247ecded75bb4c4a3bd8e8a7bd23e11ac670b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Sivák <msi...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches