From 018a0a5b846ed903d5d2545c2c353281e1e9949d Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Mon, 20 Apr 2015 17:37:21 +0530 Subject: glusterd: initialize snapd svc at volume restore path In restore path snapd svc was not initialized because of which any glusterd instance which went down and came back may have uninitialized snapd svc. The reason I used 'may' is because depending on the nodes in the cluster. In a single node cluster this wouldn't be a problem since glusterd_spawn_daemon takes care of initializing it. Backport of http://review.gluster.org/10304 Change-Id: I2da1e419a0506d3b2742c1cf39a3b9416eb3c305 BUG: 1215518 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/10304 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Kaushal M (cherry picked from commit 18fd2fdd60839d737ab0ac64f33a444b54bdeee4) Reviewed-on: http://review.gluster.org/10397 Reviewed-by: Krishnan Parthasarathi --- .../glusterd/bug-1213295-snapd-svc-uninitialized.t | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/bugs/glusterd/bug-1213295-snapd-svc-uninitialized.t (limited to 'tests') diff --git a/tests/bugs/glusterd/bug-1213295-snapd-svc-uninitialized.t b/tests/bugs/glusterd/bug-1213295-snapd-svc-uninitialized.t new file mode 100644 index 00000000000..1dbfdf8697b --- /dev/null +++ b/tests/bugs/glusterd/bug-1213295-snapd-svc-uninitialized.t @@ -0,0 +1,26 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../cluster.rc + +cleanup + +TEST launch_cluster 2; +TEST $CLI_1 peer probe $H2; +EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count + +TEST $CLI_1 volume create $V0 $H1:$B1/$V0 $H2:$B2/$V0 +TEST $CLI_1 volume start $V0 + +kill_glusterd 2 +TEST start_glusterd 2 + +EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count + +#volume stop should not crash +TEST $CLI_2 volume stop $V0 + +# check whether glusterd instance is running on H2 as this is the node which +# restored the volume configuration after a restart +EXPECT_WITHIN $PROBE_TIMEOUT 1 peer_count +cleanup -- cgit