Shubhendu Tripathi has uploaded a new change for review.

Change subject: gluster: Corrected gluster volume snapshot creation logic
......................................................................

gluster: Corrected gluster volume snapshot creation 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
Bug-Url: https://bugzilla.redhat.com/1216315
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, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/40948/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 9e3594d..70eaed3 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
@@ -154,6 +154,7 @@
             createdSnapshot.setDescription(snapshot.getDescription());
             createdSnapshot.setStatus(GlusterSnapshotStatus.DEACTIVATED);
             getDbFacade().getGlusterVolumeSnapshotDao().save(createdSnapshot);
+            addCustomValue(GlusterConstants.VOLUME_SNAPSHOT_NAME, 
createdSnapshot.getSnapshotName());
         }
 
         // Resume the snapshot sessions
@@ -176,8 +177,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 76097f4..da100c7 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -855,8 +855,8 @@
 GEOREP_OPTION_CHANGED_FROM_CLI=Detected change in value of option ${key} from 
${oldValue} to ${value} for geo-replication session on volume 
${glusterVolumeName} of cluster ${VdsGroupName}, and updated it to engine.
 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_CREATED=Snapshot ${snapname} created for volume 
${glusterVolumeName} on cluster ${vdsGroupName}.
+GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Could not create snapshot for volume 
${glusterVolumeName} on cluster ${vdsGroupName}.
 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 cddf30f..1d5cf02 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
@@ -230,8 +230,8 @@
 AuditLogType___GEOREP_SESSION_DELETE_FAILED=Failed to delete geo-replication 
session on volume
 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_CREATED=Snapshot ${snapname} created 
for volume ${glusterVolumeName} on cluster ${vdsGroupName}.
+AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CREATE_FAILED=Could not create snapshot 
for volume ${glusterVolumeName} on cluster ${vdsGroupName}.
 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/40948
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3067fd548170ae50017ce5332a24898fdc3a3da6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to