diff options
author | Avra Sengupta <asengupt@redhat.com> | 2015-06-12 17:13:05 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2015-06-22 01:44:40 -0700 |
commit | 2b9efc920762ad93575a44ae41450f78ecdb0d9e (patch) | |
tree | db432299399b215983e25da54596a68e95897853 /xlators/mgmt/glusterd/src/glusterd-snapshot.c | |
parent | 41805d75e47f2ce9f71d99e556885db008948fb2 (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-snapshot.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 9cb6095020e..f7d9a4fb621 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -9450,15 +9450,6 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, /* Use the same version as the original version */ new_volinfo->version = orig_vol->version; - /* Initialize the snapd service */ - ret = glusterd_snapdsvc_init (new_volinfo); - if (ret) { - gf_msg (this->name, GF_LOG_ERROR, 0, - GD_MSG_SNAPD_INIT_FAIL, "Failed to initialize snapd " - "service for volume %s", orig_vol->volname); - goto out; - } - /* Copy the snap vol info to the new_volinfo.*/ ret = glusterd_snap_volinfo_restore (dict, rsp_dict, new_volinfo, snap_vol, volcount); @@ -9529,6 +9520,15 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, goto out; } + /* Initialize the snapd service */ + ret = glusterd_snapdsvc_init (new_volinfo); + if (ret) { + gf_msg (this->name, GF_LOG_ERROR, 0, + GD_MSG_SNAPD_INIT_FAIL, "Failed to initialize snapd " + "service for volume %s", orig_vol->volname); + goto out; + } + ret = 0; out: if (ret) { |