diff options
-rw-r--r-- | tests/basic/multiplex.t | 6 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/basic/multiplex.t b/tests/basic/multiplex.t index 0448e5b12cd..ed8788ff3bb 100644 --- a/tests/basic/multiplex.t +++ b/tests/basic/multiplex.t @@ -69,3 +69,9 @@ nbrick0=$(ls $B0/brick0/file?? | wc -l) nbrick1=$(ls $B0/brick1/file?? | wc -l) TEST [ $((nbrick0 + nbrick1)) -eq 90 ] TEST [ $((nbrick0 * nbrick1)) -ne 0 ] + +pkill gluster +TEST glusterd +EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT 1 count_brick_pids +EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT 1 count_brick_processes + diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index f0c12315160..7e50d597fc2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -5076,11 +5076,6 @@ attach_brick (xlator_t *this, "adding brick to process failed"); return -1; } - - brickinfo->port = other_brick->port; - brickinfo->status = GF_BRICK_STARTED; - brickinfo->rpc = rpc_clnt_ref (other_brick->rpc); - GLUSTERD_GET_BRICK_PIDFILE (pidfile1, other_vol, other_brick, conf); GLUSTERD_GET_BRICK_PIDFILE (pidfile2, volinfo, brickinfo, conf); @@ -5106,6 +5101,10 @@ attach_brick (xlator_t *this, successfully */ glusterd_copy_file (pidfile1, pidfile2); + brickinfo->port = other_brick->port; + brickinfo->status = GF_BRICK_STARTED; + brickinfo->rpc = + rpc_clnt_ref (other_brick->rpc); return 0; } } |