diff options
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapd-svc.c | 11 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 8 |
3 files changed, 9 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c index d1a7da7e0ae..7e63929f28e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c @@ -319,17 +319,6 @@ glusterd_snapdsvc_restart () GF_ASSERT (conf); cds_list_for_each_entry (volinfo, &conf->volumes, vol_list) { - /* Init per volume snapd svc */ - ret = glusterd_snapdsvc_init (volinfo); - if (ret) { - gf_log (this->name, GF_LOG_ERROR, "snapd service " - "initialization failed for volume %s", - volinfo->volname); - goto out; - } - gf_log (this->name, GF_LOG_DEBUG, "snapd service initialized " - "for %s", volinfo->volname); - /* Start per volume snapd svc */ if (volinfo->status == GLUSTERD_STATUS_STARTED && glusterd_is_snapd_enabled (volinfo)) { diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 476bfb8e017..7280a12d0cd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -6072,6 +6072,7 @@ glusterd_snapshot_clone_commit (dict_t *dict, char **op_errstr, goto out; } ret = glusterd_snapdsvc_init (snap_vol); + glusterd_list_add_order (&snap_vol->vol_list, &priv->volumes, glusterd_compare_volume_name); diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index fdf3365056b..0beae3e8bbf 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -2950,6 +2950,14 @@ glusterd_store_retrieve_volume (char *volname, glusterd_snap_t *snap) if (snap) volinfo->is_snap_volume = _gf_true; + /* Initialize the snapd service */ + ret = glusterd_snapdsvc_init (volinfo); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, "Failed to initialize snapd " + "service for volume %s", volinfo->volname); + goto out; + } + ret = glusterd_store_update_volinfo (volinfo); if (ret) { gf_log (this->name, GF_LOG_ERROR, "Failed to update volinfo " |