summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs/snapshot/bug-1316437.t30
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapd-svc.c9
2 files changed, 34 insertions, 5 deletions
diff --git a/tests/bugs/snapshot/bug-1316437.t b/tests/bugs/snapshot/bug-1316437.t
new file mode 100644
index 00000000000..30a221e3171
--- /dev/null
+++ b/tests/bugs/snapshot/bug-1316437.t
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+. $(dirname $0)/../../include.rc
+. $(dirname $0)/../../volume.rc
+. $(dirname $0)/../../snapshot.rc
+
+cleanup;
+
+TEST glusterd
+
+# Intentionally not carving lvms for this as we will not be taking
+# snapshots in this testcase
+TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{1,2,3,4,5,6};
+
+TEST $CLI volume start $V0;
+
+TEST $CLI volume set $V0 features.uss enable;
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Y' check_if_snapd_exist
+
+killall glusterd glusterfsd glusterfs
+
+SNAPD_PID=$(ps auxww | grep snapd | grep -v grep | awk '{print $2}');
+TEST ! [ $SNAPD_PID -gt 0 ];
+
+glusterd
+
+EXPECT_WITHIN $PROCESS_UP_TIMEOUT 'Y' check_if_snapd_exist
+
+cleanup;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
index 82ba7f77551..830dc1a706d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapd-svc.c
@@ -360,15 +360,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;
}
}