summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-06-12 17:13:05 +0530
committerRajesh Joseph <rjoseph@redhat.com>2015-06-22 01:44:40 -0700
commit2b9efc920762ad93575a44ae41450f78ecdb0d9e (patch)
treedb432299399b215983e25da54596a68e95897853 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c
parent41805d75e47f2ce9f71d99e556885db008948fb2 (diff)
glusterd/uss/snapshot: Intialise snapdsvc after volfiles are created
snapd svc should be initialised only after all relevant volfiles and directories are created. Change-Id: I96770cfc0b350599cd60ff74f5ecec08145c3105 BUG: 1231197 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11227 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index a13ddcaff18..65043736ea5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -2273,16 +2273,18 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
volinfo->caps = caps;
- ret = glusterd_snapdsvc_init (volinfo);
+ ret = glusterd_store_volinfo (volinfo,
+ GLUSTERD_VOLINFO_VER_AC_INCREMENT);
if (ret) {
- *op_errstr = gf_strdup ("Failed to initialize snapd service");
+ glusterd_store_delete_volume (volinfo);
+ *op_errstr = gf_strdup ("Failed to store the "
+ "Volume information");
goto out;
}
- ret = glusterd_store_volinfo (volinfo, GLUSTERD_VOLINFO_VER_AC_INCREMENT);
+ ret = glusterd_snapdsvc_init (volinfo);
if (ret) {
- glusterd_store_delete_volume (volinfo);
- *op_errstr = gf_strdup ("Failed to store the Volume information");
+ *op_errstr = gf_strdup ("Failed to initialize snapd service");
goto out;
}