diff options
| author | Avra Sengupta <asengupt@redhat.com> | 2016-03-10 14:32:03 +0530 | 
|---|---|---|
| committer | Rajesh Joseph <rjoseph@redhat.com> | 2016-03-22 00:48:03 -0700 | 
| commit | 918436e5b587588e285809bf56b241c90cf942c3 (patch) | |
| tree | 4db0c850dfebe3d1eed9c51d1a562bce3f619bfc /xlators | |
| parent | fbab6982bd8ff902b0187dbce5707c5bd98c8945 (diff) | |
snapshot: Use svc->manager during glusterd restart
    Backport of http://review.gluster.org/#/c/13665/
Instead of using svc->start, we should use svc->manager
as it takes care of initializing svc too, and both starts
and stops snapd as needed.
Change-Id: I3d3afdf4c4203bee3b790a017b820339fd376af6
BUG: 1316806
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/13665
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
(cherry picked from commit 07a5d9e1e103c8e3ab69283711ee0832d469e145)
Reviewed-on: http://review.gluster.org/13675
Diffstat (limited to 'xlators')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapd-svc.c | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c index 993419c8926..71188ebc5d9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c @@ -359,15 +359,14 @@ glusterd_snapdsvc_restart ()          cds_list_for_each_entry (volinfo, &conf->volumes, vol_list) {                  /* Start per volume snapd svc */ -                if (volinfo->status == GLUSTERD_STATUS_STARTED && -                    glusterd_is_snapd_enabled (volinfo)) { +                if (volinfo->status == GLUSTERD_STATUS_STARTED) {                          svc = &(volinfo->snapd.svc); -                        ret = svc->start (svc, PROC_START_NO_WAIT); +                        ret = svc->manager (svc, volinfo, PROC_START_NO_WAIT);                          if (ret) {                                  gf_msg (this->name, GF_LOG_ERROR, 0,                                          GD_MSG_SNAPD_START_FAIL, -                                        "Couldn't start snapd for " -                                        "vol: %s", volinfo->volname); +                                        "Couldn't resolve snapd for " +                                        "vol: %s on restart", volinfo->volname);                                  goto out;                          }                  }  | 
