Arik Hadas has uploaded a new change for review.

Change subject: core: block migration for paused VM due to EIO only
......................................................................

core: block migration for paused VM due to EIO only

We used to block migration for VMs which are paused because of any
reason other than NOERR. From now on, we will allow to migrate paused
VMs if their pause reason is different than EIO, and only for those that
are paused because of EIO we will block migrations.

Change-Id: I68f238330b30f21aef070d99431e951cf9ef5c84
Bug-Url: https://bugzilla.redhat.com/1099506
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
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/errors/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(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/75/28475/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 f6ea7b0..869d8c5 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
@@ -311,8 +311,8 @@
             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_STATUS_ILLEGAL, 
LocalizedVmStatus.from(VMStatus.NotResponding));
 
         case Paused:
-            if (vm.getVmPauseStatus() != VmPauseStatus.NOERR) {
-                return 
failCanDoAction(VdcBllMessages.MIGRATE_PAUSED_ERR_VM_IS_UNSUPPORTED);
+            if (vm.getVmPauseStatus() == VmPauseStatus.EIO) {
+                return 
failCanDoAction(VdcBllMessages.MIGRATE_PAUSED_EIO_VM_IS_NOT_SUPPORTED);
             }
             break;
 
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 fc42dc8..e2750e1 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
@@ -843,7 +843,7 @@
     ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST(ErrorType.BAD_PARAMETERS),
     VDS_CANNOT_REMOVE_HOST_HAVING_GLUSTER_VOLUME(ErrorType.CONFLICT),
     ACTION_TYPE_FAILED_NO_GLUSTER_HOST_TO_PEER_PROBE(ErrorType.CONFLICT),
-    MIGRATE_PAUSED_ERR_VM_IS_UNSUPPORTED(ErrorType.NOT_SUPPORTED),
+    MIGRATE_PAUSED_EIO_VM_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
     ACTION_TYPE_FAILED_SERVER_NAME_REQUIRED(ErrorType.BAD_PARAMETERS),
     SERVER_ALREADY_EXISTS_IN_ANOTHER_CLUSTER(ErrorType.CONFLICT),
     SERVER_ALREADY_PART_OF_ANOTHER_CLUSTER(ErrorType.CONFLICT),
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 c53cf6e..cb50312 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1042,7 +1042,7 @@
 ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_AND_MIGRATABLE=Migratable VM's 
cannot be pinned to CPU.
 ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_WITH_UNDEFINED_HOST=Cannot set 
host CPU pinning when host is not selected
 ACTION_TYPE_FAILED_NETWORK_INTERFACE_MAC_INVALID=Cannot ${action} ${type}. The 
Network Interface ${IfaceName} has an invalid MAC address ${MacAddress}. MAC 
address must be in format "HH:HH:HH:HH:HH:HH" where H is a hexadecimal 
character (either a digit or A-F, case is insignificant).
-MIGRATE_PAUSED_ERR_VM_IS_UNSUPPORTED=Migrating a VM in paused status due to an 
error is unsupported.
+MIGRATE_PAUSED_EIO_VM_IS_NOT_SUPPORTED=Migrating a VM in paused status due to 
I/O error is not supported.
 VM_INTERFACE_NOT_EXIST=Cannot ${action} ${type}. The VM Network Interface does 
not exist.
 HOST_NETWORK_INTERFACE_NOT_EXIST=Cannot ${action} ${type}. The host network 
interface does not exist.
 ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_DEVICE=Cannot ${action} ${type}. The 
VM Network Interface is plugged to a running VM.
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 61e7a88..2174252 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
@@ -2802,8 +2802,11 @@
     @DefaultStringValue("Cannot ${action} ${type}. The Network Interface 
${IfaceName} has an invalid MAC address ${MacAddress}. MAC address must be in 
format \"HH:HH:HH:HH:HH:HH\" where H is a hexadecimal character (either a digit 
or A-F, case is insignificant).")
     String ACTION_TYPE_FAILED_NETWORK_INTERFACE_MAC_INVALID();
 
-    @DefaultStringValue("Migrating a VM in paused status due to an error is 
unsupported.")
-    String MIGRATE_PAUSED_ERR_VM_IS_UNSUPPORTED();
+    @DefaultStringValue("Cannot ${action} ${type}. Tag ID is required.")
+    String ACTION_TYPE_FAILED_TAG_ID_REQUIRED();
+
+    @DefaultStringValue("Migrating a VM in paused status due to I/O error is 
not supported.")
+    String MIGRATE_PAUSED_EIO_VM_IS_NOT_SUPPORTED();
 
     @DefaultStringValue("Cannot ${action} ${type}. The VM Network Interface 
does not exist.")
     String VM_INTERFACE_NOT_EXIST();
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 0e8dcde..5d86fc2 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
@@ -943,7 +943,7 @@
 ERROR_GET_STORAGE_DOMAIN_LIST=Cannot get Storage Domains list.
 ACTION_TYPE_FAILED_VDS_CLUSTER_DIFFERENT_ARCHITECTURES=Cannot ${action} 
${type}. The host and the destination cluster architectures do not match.
 ACTION_TYPE_FAILED_NETWORK_INTERFACE_MAC_INVALID=Cannot ${action} ${type}. The 
Network Interface ${IfaceName} has an invalid MAC address ${MacAddress}. MAC 
address must be in format "HH:HH:HH:HH:HH:HH" where H is a hexadecimal 
character (either a digit or A-F, case is insignificant).
-MIGRATE_PAUSED_ERR_VM_IS_UNSUPPORTED=Migrating a VM in paused status due to an 
error is unsupported.
+MIGRATE_PAUSED_EIO_VM_IS_NOT_SUPPORTED=Migrating a VM in paused status due to 
I/O error is not supported.
 VM_INTERFACE_NOT_EXIST=Cannot ${action} ${type}. The VM Network Interface does 
not exist.
 ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_DEVICE=Cannot ${action} ${type}. The 
VM Network Interface is plugged to a running VM.
 USER_CANNOT_FORCE_RECONNECT_TO_VM=Console connection denied. Another user has 
already accessed the console of this VM. The VM should be rebooted to allow 
another user to access it, or changed by an admin to not enforce reboot between 
users accessing its console.
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 c0d65ce..bf3e468 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
@@ -974,7 +974,7 @@
 ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_AND_MIGRATABLE=Migratable VM's 
cannot be pinned to CPU.
 ACTION_TYPE_FAILED_VM_CANNOT_BE_PINNED_TO_CPU_WITH_UNDEFINED_HOST=Cannot set 
host CPU pinning when host is not selected
 ACTION_TYPE_FAILED_NETWORK_INTERFACE_MAC_INVALID=Cannot ${action} ${type}. The 
Network Interface ${IfaceName} has an invalid MAC address ${MacAddress}. MAC 
address must be in format "HH:HH:HH:HH:HH:HH" where H is a hexadecimal 
character (either a digit or A-F, case is insignificant).
-
+MIGRATE_PAUSED_EIO_VM_IS_NOT_SUPPORTED=Migrating a VM in paused status due to 
I/O error is not supported.
 VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED=Cannot ${action} 
${type}. Enabling both Virt and Gluster services is not allowed.
 VM_INTERFACE_NOT_EXIST=Cannot ${action} ${type}. The VM Network Interface does 
not exist.
 HOST_NETWORK_INTERFACE_NOT_EXIST=Cannot ${action} ${type}. The host network 
interface does not exist.


-- 
To view, visit http://gerrit.ovirt.org/28475
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68f238330b30f21aef070d99431e951cf9ef5c84
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to