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 down because of EIO we will block migrations.

Change-Id: I68f238330b30f21aef070d99431e951cf9ef5c84
Signed-off-by: Arik Hadas <[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/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, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/27812/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 8b5cb35..f219207 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
@@ -308,8 +308,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 8f25e23..ad94ec6 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
@@ -866,7 +866,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 ff16a20..e4a7b94 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -1064,7 +1064,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 8fa0e81..5ef1b80 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
@@ -2868,8 +2868,8 @@
     @DefaultStringValue("Cannot ${action} ${type}. Tag ID is required.")
     String ACTION_TYPE_FAILED_TAG_ID_REQUIRED();
 
-    @DefaultStringValue("Migrating a VM in paused status due to an error is 
unsupported.")
-    String MIGRATE_PAUSED_ERR_VM_IS_UNSUPPORTED();
+    @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 6735ee2..8bacc3a 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
@@ -962,7 +962,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 11672ae..321ff84 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
@@ -995,7 +995,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/27812
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68f238330b30f21aef070d99431e951cf9ef5c84
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to