Tal Nisan has uploaded a new change for review. Change subject: core: Changed master connection type in RecoveryStoragePool command ......................................................................
core: Changed master connection type in RecoveryStoragePool command As a part of the effort to remove the type of storage pool, this patch makes the RecoveryStoragePoolCommand use the storage helper of the type of new master when connecting to the new master. Until now the old master type was used since it didn't make any difference since the types of the old and new were always the same Change-Id: Ifb0b0f98bdd239f201add78b08e8c1f86cf84757 Relates-To: https://bugzilla.redhat.com/1038053 Signed-off-by: Tal Nisan <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.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, 1 insertion(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/23586/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java index 0cdb54a..5f976e7 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RecoveryStoragePoolCommand.java @@ -68,9 +68,6 @@ if (domain.getStorageDomainSharedStatus() != StorageDomainSharedStatus.Unattached) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_STATUS_ILLEGAL); returnValue = false; - } else if (domain.getStorageType() != getStoragePool().getStorageType()) { - addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH); - returnValue = false; } } } @@ -90,7 +87,7 @@ @Override protected void executeCommand() { - if (StorageHelperDirector.getInstance().getItem(getStorageDomain().getStorageType()) + if (StorageHelperDirector.getInstance().getItem(getNewMaster(false).getStorageType()) .connectStorageToDomainByVdsId(getNewMaster(false), getVds().getId())) { ((EventQueue) EjbUtils.findBean(BeanType.EVENTQUEUE_MANAGER, BeanProxyType.LOCAL)).submitEventSync(new Event(getParameters().getStoragePoolId(), 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 1e4eb7a..55a8ac6 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 @@ -568,7 +568,6 @@ ERROR_CANNOT_FORCE_REMOVE_STORAGE_POOL_WITH_VDS_NOT_IN_MAINTENANCE(ErrorType.CONFLICT), ERROR_CANNOT_UPDATE_STORAGE_POOL_COMPATIBILITY_VERSION_BIGGER_THAN_CLUSTERS(ErrorType.INCOMPATIBLE_VERSION), ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL(ErrorType.BAD_PARAMETERS), - ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH(ErrorType.BAD_PARAMETERS), ERROR_CANNOT_REMOVE_STORAGE_DOMAIN_DO_FORMAT(ErrorType.BAD_PARAMETERS), ERROR_CANNOT_MANAGE_STORAGE_DOMAIN(ErrorType.NOT_SUPPORTED), ERROR_CANNOT_FIND_ISO_IMAGE_PATH(ErrorType.BAD_PARAMETERS), 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 7f4315e..a09b671 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -484,7 +484,6 @@ LABELED_NETWORK_ATTACHED_TO_WRONG_INTERFACE=Cannot ${action} ${type}. The following networks are already attached to a different interface on the host: ${AssignedNetworks}. Please remove the networks in order to label the interface. OTHER_INTERFACE_ALREADY_LABELED=Cannot ${action} ${type}. The label is already defined on other interface ${LabeledNic} on the host. ERROR_CANNOT_RECOVERY_STORAGE_POOL_THERE_IS_ACTIVE_DATA_DOMAINS=Cannot recover Data Center with active Data Storage Domain in Data Center. -ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH=Cannot recover Data Center. Mismatch between Storage Domain type and Data Center type. ERROR_CANNOT_DETACH_LAST_STORAGE_DOMAIN=Cannot remove the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n\ -Either activate another Storage Domain in the Data Center, or remove the Data Center. ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN=Cannot destroy the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n\ 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 bd1257d..783b53a 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 @@ -1342,9 +1342,6 @@ @DefaultStringValue("Cannot recover Data Center with active Data Storage Domain in Data Center.") String ERROR_CANNOT_RECOVERY_STORAGE_POOL_THERE_IS_ACTIVE_DATA_DOMAINS(); - @DefaultStringValue("Cannot recover Data Center. Mismatch between Storage Domain type and Data Center type.") - String ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH(); - @DefaultStringValue("Cannot remove the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n-Either activate another Storage Domain in the Data Center, or remove the Data Center.") String ERROR_CANNOT_DETACH_LAST_STORAGE_DOMAIN(); 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 4cb992c..b56294a 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 @@ -464,7 +464,6 @@ order to label the interface. OTHER_INTERFACE_ALREADY_LABELED=Cannot ${action} ${type}. The label is already defined on other interface ${LabeledNic} on the host. ERROR_CANNOT_RECOVERY_STORAGE_POOL_THERE_IS_ACTIVE_DATA_DOMAINS=Cannot recover Data Center with active Data Storage Domain in Data Center. -ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH=Cannot recover Data Center. Mismatch between Storage Domain type and Data Center type. ERROR_CANNOT_DETACH_LAST_STORAGE_DOMAIN=Cannot remove the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n\ -Either activate another Storage Domain in the Data Center, or remove the Data Center. ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN=Cannot destroy the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n\ 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 ec44915..c0fc1c6 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 @@ -489,7 +489,6 @@ order to label the interface. OTHER_INTERFACE_ALREADY_LABELED=Cannot ${action} ${type}. The label is already defined on other interface ${LabeledNic} on the host. ERROR_CANNOT_RECOVERY_STORAGE_POOL_THERE_IS_ACTIVE_DATA_DOMAINS=Cannot recover Data Center with active Data Storage Domain in Data Center. -ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH=Cannot recover Data Center. Mismatch between Storage Domain type and Data Center type. ERROR_CANNOT_DETACH_LAST_STORAGE_DOMAIN=Cannot remove the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n\ -Either activate another Storage Domain in the Data Center, or remove the Data Center. ERROR_CANNOT_DESTROY_LAST_STORAGE_DOMAIN=Cannot destroy the master Storage Domain from the Data Center without another active Storage Domain to take its place.\n\ -- To view, visit http://gerrit.ovirt.org/23586 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb0b0f98bdd239f201add78b08e8c1f86cf84757 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Tal Nisan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
