diff options
author | Mohit Agrawal <moagrawal@redhat.com> | 2018-07-12 13:29:48 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-07-27 01:24:09 +0000 |
commit | 9400b6f2c8aa219a493961e0ab9770b7f12e80d2 (patch) | |
tree | 50e31f0467b154d39f3d602e5a0f05d65d38a76c /tests/bugs/quota/bug-1293601.t | |
parent | 2836e158f38eb9ed070de88b64a3a8758cd2d4c0 (diff) |
glusterd: Add multiple checks before attach/start a brick
Problem: In brick mux scenario sometime glusterd is not able
to start/attach a brick and gluster v status shows
brick is already running
Solution:
1) To make sure brick is running check brick_path in
/proc/<pid>/fd , if a brick is consumed by the brick
process it means brick stack is come up otherwise not
2) Before start/attach a brick check if a brick is mounted
or not
3) At the time of printing volume status check brick is
consumed by any brick process
Test: To test the same followed procedure
1) Setup brick mux environment on a vm
2) Put a breaking point in gdb in function posix_health_check_thread_proc
at the time of notify GF_EVENT_CHILD_DOWN event
3) unmount anyone brick path forcefully
4) check gluster v status it will show N/A for the brick
5) Try to start volume with force option, glusterd throw
message "No device available for mount brick"
6) Mount the brick_root path
7) Try to start volume with force option
8) down brick is started successfully
Change-Id: I91898dad21d082ebddd12aa0d1f7f0ed012bdf69
fixes: bz#1595320
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Diffstat (limited to 'tests/bugs/quota/bug-1293601.t')
-rw-r--r-- | tests/bugs/quota/bug-1293601.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/bugs/quota/bug-1293601.t b/tests/bugs/quota/bug-1293601.t index def4ef9eda3..741758b73f5 100644 --- a/tests/bugs/quota/bug-1293601.t +++ b/tests/bugs/quota/bug-1293601.t @@ -9,6 +9,7 @@ TEST glusterd TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4} TEST $CLI volume start $V0 +EXPECT_WITHIN $PROCESS_UP_TIMEOUT "4" online_brick_count TEST $CLI volume quota $V0 enable TEST glusterfs --volfile-server=$H0 --volfile-id=$V0 $M0; @@ -27,6 +28,6 @@ EXPECT_WITHIN $MARKER_UPDATE_TIMEOUT "1.0MB" quotausage "/" TEST $CLI volume quota $V0 disable TEST $CLI volume quota $V0 enable -EXPECT_WITHIN 40 "1.0MB" quotausage "/" +EXPECT_WITHIN 60 "1.0MB" quotausage "/" cleanup; |