Daniel Erez has uploaded a new change for review. Change subject: core: lsm - prevent moving a shareable disk ......................................................................
core: lsm - prevent moving a shareable disk * Preventing shareable disk move. * Fixing error messages (shared -> shareable). * Fixing typo in error messages (opperation -> operation). Change-Id: Ibd235a4c0634f246d7613e520af7f245ccdbc779 Bug-Url: https://bugzilla.redhat.com/872969 Signed-off-by: Daniel Erez <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.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, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/9020/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java index 988c10c..559b6d1 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java @@ -78,8 +78,8 @@ return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED); } - if (vmsForDisk.size() > 1) { - return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_SHARED_DISK_NOT_SUPPORTED); + if (getDiskImage().isShareable()) { + return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED); } // Cache for future use 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 4c6e7f9..cad7ef6 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 @@ -171,7 +171,7 @@ ACTION_TYPE_FAILED_HOST_NOT_EXIST, ACTION_TYPE_FAILED_VM_SNAPSHOT_NOT_IN_PREVIEW, ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED, - ACTION_TYPE_FAILED_SHARED_DISK_NOT_SUPPORTED, + ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED, VDS_CANNOT_REMOVE_DEFAULT_VDS_GROUP, VDS_CANNOT_REMOVE_VDS_DETECTED_RUNNING_VM, 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 0052a4f..42705a3 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -729,8 +729,8 @@ ACTION_TYPE_FAILED_NETWORK_NOT_IN_CLUSTER=Failed ${action} ${type}. The following networks (${networks}) are not defined in the cluster. ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED=Failed ${action} ${type}. One or more network interfaces have incomplete network configuration. Please configure these interfaces and try again. ACTION_TYPE_FAILED_VM_SNAPSHOT_NOT_IN_PREVIEW=Cannot ${action} ${type} to a Snapshot that is not being previewed. Please select the correct Snapshot to restore to: Either the one being previewed, or the one before the preview. -ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=Cannot ${action} a floating ${type}. This opperation is not supported. -ACTION_TYPE_FAILED_SHARED_DISK_NOT_SUPPORTED=Cannot ${action} a shared ${type}. This opperation is not supported. +ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=Cannot ${action} a floating ${type}. This operation is not supported. +ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED=Cannot ${action} a shareable ${type}. This operation is not supported. ACTION_TYPE_FAILED_DISK_NOT_EXIST=Cannot ${action} ${type}. The specified disk does not exist. ACTION_TYPE_FAILED_DISK_IS_NOT_TEMPLATE_DISK=Cannot ${action} ${type}. The selected disk is not a template disk. Only template disks can be copied. ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME=Cannot ${action} ${type}. The source and target storage domains are the same. 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 6f8de4b..3536416 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 @@ -1945,11 +1945,11 @@ @DefaultStringValue("Cannot ${action} ${type} to a Snapshot that is not being previewed. Please select the correct Snapshot to restore to: Either the one being previewed, or the one before the preview.") String ACTION_TYPE_FAILED_VM_SNAPSHOT_NOT_IN_PREVIEW(); - @DefaultStringValue("Cannot ${action} a floating ${type}. This opperation is not supported.") + @DefaultStringValue("Cannot ${action} a floating ${type}. This operation is not supported.") String ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED(); - @DefaultStringValue("Cannot ${action} a shared ${type}. This opperation is not supported.") - String ACTION_TYPE_FAILED_SHARED_DISK_NOT_SUPPORTED(); + @DefaultStringValue("Cannot ${action} a shareable ${type}. This operation is not supported.") + String ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED(); @DefaultStringValue("Cannot ${action} ${type}. The specified disk does not exist.") String ACTION_TYPE_FAILED_DISK_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 a653c12..3a3bc28 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 @@ -719,8 +719,8 @@ VM_CANNOT_CANCEL_MIGRATION_WHEN_VM_IS_NOT_MIGRATING=Cannot cancel migration for non migrating VM. ACTION_TYPE_FAILED_VM_SNAPSHOT_NOT_IN_PREVIEW=Cannot ${action} ${type} to a Snapshot that is not being previewed. Please select the correct Snapshot to restore to: Either the one being previewed, or the one before the preview. ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=${action} ${type} of a floating disk is not supported. -ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=Cannot ${action} a floating ${type}. This opperation is not supported. -ACTION_TYPE_FAILED_SHARED_DISK_NOT_SUPPORTED=Cannot ${action} a shared ${type}. This opperation is not supported. +ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=Cannot ${action} a floating ${type}. This operation is not supported. +ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED=Cannot ${action} a shareable ${type}. This operation is not supported. ACTION_TYPE_FAILED_DISK_IS_NOT_TEMPLATE_DISK=Cannot ${action} ${type}. The selected disk is not a template disk. Only template disks can be copied. ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME=Cannot ${action} ${type}. The source and target storage domains are the same. ACTION_TYPE_FAILED_CANNOT_MOVE_TEMPLATE_DISK=Cannot ${action} ${type}. Template disks cannot be moved. 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 8604db7..4941adc 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 @@ -719,8 +719,8 @@ VM_CANNOT_CANCEL_MIGRATION_WHEN_VM_IS_NOT_MIGRATING=Cannot cancel migration for non migrating VM. ACTION_TYPE_FAILED_VM_SNAPSHOT_NOT_IN_PREVIEW=Cannot ${action} ${type} to a Snapshot that is not being previewed. Please select the correct Snapshot to restore to: Either the one being previewed, or the one before the preview. ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=${action} ${type} of a floating disk is not supported. -ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=Cannot ${action} a floating ${type}. This opperation is not supported. -ACTION_TYPE_FAILED_SHARED_DISK_NOT_SUPPORTED=Cannot ${action} a shared ${type}. This opperation is not supported. +ACTION_TYPE_FAILED_FLOATING_DISK_NOT_SUPPORTED=Cannot ${action} a floating ${type}. This operation is not supported. +ACTION_TYPE_FAILED_SHAREABLE_DISK_NOT_SUPPORTED=Cannot ${action} a shareable ${type}. This operation is not supported. ACTION_TYPE_FAILED_DISK_IS_NOT_TEMPLATE_DISK=Cannot ${action} ${type}. The selected disk is not a template disk. Only template disks can be copied. ACTION_TYPE_FAILED_SOURCE_AND_TARGET_SAME=Cannot ${action} ${type}. The source and target storage domains are the same. ACTION_TYPE_FAILED_CANNOT_MOVE_TEMPLATE_DISK=Cannot ${action} ${type}. Template disks cannot be moved. -- To view, visit http://gerrit.ovirt.org/9020 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd235a4c0634f246d7613e520af7f245ccdbc779 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
