Alona Kaplan has uploaded a new change for review.
Change subject: webadmin: Make pinned to host error clearer.
......................................................................
webadmin: Make pinned to host error clearer.
If there is an error when trying to run a vm that is pinned to a host,
the disaplyed error message should be-
- The specific error why the vm cannot run.
- Note: The VM is pinned to Host '${VdsName}' but cannot r un on it.
Change-Id: I1645a1dbe402c73c9e44545819368b01f00e3990
Bug-Url: https://bugzilla.redhat.com/878451
Signed-off-by: Alona Kaplan <[email protected]>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.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
5 files changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/60/12460/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 16c5636..3862c56 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
@@ -106,14 +106,12 @@
if (!returnValue) {
if (privateVm.getMigrationSupport() ==
MigrationSupport.PINNED_TO_HOST) {
- // This message should be the first one cause it has high
priority
- messages.add(0,
VdcBllMessages.VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS.toString());
+
messages.add(VdcBllMessages.VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS.toString());
VDS host = getDestinationVdsId() == null ? null :
DbFacade.getInstance()
.getVdsDao()
.get(getDestinationVdsId());
- messages.add(1,
- host == null ?
VdcBllMessages.HOST_NAME_NOT_AVAILABLE.toString()
+ messages.add(host == null ?
VdcBllMessages.HOST_NAME_NOT_AVAILABLE.toString()
: String.format("$VdsName %1$s",
host.getName()));
return false;
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 b7b185f..732c49c 100644
---
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -152,7 +152,7 @@
ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE=Cannot ${action} ${type}. VM is non
migratable.
ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE_AND_IS_NOT_FORCED_BY_USER_TO_MIGRATE=Cannot
${action} ${type}. VM is non migratable and user did not specify the
force-migration flag
ACTION_TYPE_FAILED_VM_IS_PINNED_TO_HOST=Cannot ${action} ${type}. VM is pinned
to Host.
-VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Cannot ${action} ${type}. VM
is pinned to Host '${VdsName}' but cannot run on it.
+VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Note: The VM is pinned to Host
'${VdsName}' but cannot run on it.
HOST_NAME_NOT_AVAILABLE=$VdsName [N/A]
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.
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 5a16887..07751fc 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,7 +386,7 @@
@DefaultStringValue("Cannot ${action} ${type}. VM is pinned to Host.")
String ACTION_TYPE_FAILED_VM_IS_PINNED_TO_HOST();
- @DefaultStringValue("Cannot ${action} ${type}. VM is pinned to Host
'${VdsName}' but cannot run on it.")
+ @DefaultStringValue("Note: The VM is pinned to Host '${VdsName}' but
cannot run on it.")
String VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS();
@DefaultStringValue("$VdsName [N/A]")
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 6b054c6..4916a4d 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
@@ -150,7 +150,7 @@
ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE=Cannot ${action} ${type}. VM is non
migratable.
ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE_AND_IS_NOT_FORCED_BY_USER_TO_MIGRATE=Cannot
${action} ${type}. VM is non migratable and user did not specify the
force-migration flag
ACTION_TYPE_FAILED_VM_IS_PINNED_TO_HOST=Cannot ${action} ${type}. VM is pinned
to Host.
-VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Cannot ${action} ${type}. VM
is pinned to Host '${VdsName}' but cannot run on it.
+VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Note: The VM is pinned to Host
'${VdsName}' but cannot run on it.
HOST_NAME_NOT_AVAILABLE=$VdsName [N/A]
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.
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 a3fbddd..4902a2d 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
@@ -149,7 +149,7 @@
ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE=Cannot ${action} ${type}. VM is non
migratable.
ACTION_TYPE_FAILED_VM_IS_NON_MIGRTABLE_AND_IS_NOT_FORCED_BY_USER_TO_MIGRATE=Cannot
${action} ${type}. VM is non migratable and user did not specify the
force-migration flag
ACTION_TYPE_FAILED_VM_IS_PINNED_TO_HOST=Cannot ${action} ${type}. VM is pinned
to Host.
-VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Cannot ${action} ${type}. VM
is pinned to Host '${VdsName}' but cannot run on it.
+VM_PINNED_TO_HOST_CANNOT_RUN_ON_THE_DEFAULT_VDS=Note: The VM is pinned to Host
'${VdsName}' but cannot run on it.
HOST_NAME_NOT_AVAILABLE=$VdsName [N/A]
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.
--
To view, visit http://gerrit.ovirt.org/12460
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1645a1dbe402c73c9e44545819368b01f00e3990
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches