Shubhendu Tripathi has uploaded a new change for review. Change subject: gluster: Corrected gluster volume snapshot logic ......................................................................
gluster: Corrected gluster volume snapshot logic Corrected the gluster volume snapshot creation logic to fail with proper error if the snapshot creation failed at gluster side. Change-Id: I3067fd548170ae50017ce5332a24898fdc3a3da6 Bug-Url: https://bugzilla.redhat.com/1212936 Signed-off-by: Shubhendu Tripathi <shtri...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties M frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties 3 files changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/07/40407/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java index a76f2ff..5d35b64 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java @@ -153,6 +153,7 @@ createdSnapshot.setDescription(snapshot.getDescription()); createdSnapshot.setStatus(GlusterSnapshotStatus.DEACTIVATED); getDbFacade().getGlusterVolumeSnapshotDao().save(createdSnapshot); + addCustomValue(GlusterConstants.VOLUME_SNAPSHOT_NAME, createdSnapshot.getSnapshotName()); } // Resume the snapshot sessions @@ -175,8 +176,6 @@ } } } - - setSucceeded(true); } @Override diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties index 632d32e..cf9b72d 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -885,7 +885,7 @@ GLUSTER_MASTER_VOLUME_STOP_FAILED_DURING_SNAPSHOT_RESTORE=Could not stop master volume ${glusterVolumeName} during snapshot restore. GLUSTER_MASTER_VOLUME_SNAPSHOT_RESTORE_FAILED=Could not restore master volume ${glusterVolumeName}. GLUSTER_VOLUME_SNAPSHOT_CREATED=Snapshot ${snapname} created for volume ${glusterVolumeName}. -GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Could not create ${snapname} for volume ${glusterVolumeName}. +GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Could not create snapshot for volume ${glusterVolumeName}. CREATE_GLUSTER_BRICK=Brick ${brickName} created successfully. CREATE_GLUSTER_BRICK_FAILED=Failed to create brick ${brickName}. diff --git a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties index be97a75..3485487 100644 --- a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties +++ b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties @@ -243,7 +243,7 @@ AuditLogType___GEOREP_SESSION_START=Geo-replication session started on volume AuditLogType___GEOREP_SESSION_START_FAILED=Failed to start geo-replication session on volume AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CREATED=Snapshot created for the volume -AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Failed create snapshot for the volume +AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Failed to create snapshot for the volume AuditLogType___GLUSTER_GEOREP_CONFIG_SET=Configuration has been set on the geo-rep session. AuditLogType___GLUSTER_GEOREP_CONFIG_SET_FAILED=Failed to set the configuration on geo-rep session. AuditLogType___GLUSTER_GEOREP_CONFIG_SET_DEFAULT=Configuration has been reset to its default value. -- To view, visit https://gerrit.ovirt.org/40407 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3067fd548170ae50017ce5332a24898fdc3a3da6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches