From 12ae3c448c8435decdff27643d5785698ac19dff Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Thu, 8 Sep 2016 11:33:59 +0530 Subject: socket: pollerr event shouldn't trigger socket_connnect_finish If connect fails with any other error than EINPROGRESS we cannot get the error status using getsockopt (... SO_ERROR ... ). Hence we need to remember the state of connect and take appropriate action in the event_handler for the same. As an added note, a event can come where poll_err is HUP and we have poll_in as well (i.e some status was written to the socket), so for such cases we need to finish the connect, process the data and then the poll_err as is the case in the current code. Special thanks to Kaushal M & Raghavendra G for figuring out the issue. Change-Id: Ic45ad59ff8ab1d0a9d2cab2c924ad940b9d38528 BUG: 1372356 Signed-off-by: Atin Mukherjee Signed-off-by: Shyam Reviewed-on: http://review.gluster.org/15440 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Raghavendra G --- tests/bugs/changelog/bug-1211327.t | 8 +++----- tests/bugs/ec/bug-1236065.t | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/bugs/changelog/bug-1211327.t b/tests/bugs/changelog/bug-1211327.t index 19d6e76ecab..a849ec3981f 100644 --- a/tests/bugs/changelog/bug-1211327.t +++ b/tests/bugs/changelog/bug-1211327.t @@ -27,15 +27,13 @@ TEST $CLI volume set $V0 changelog.changelog on; sleep 1 TEST killall_gluster; -sleep 1 -EXPECT 0 online_brick_count; +EXPECT_WITHIN $CHILD_UP_TIMEOUT "0" online_brick_count TEST glusterd; TEST pidof glusterd; -##Let the brick processes starts -sleep 1; -EXPECT 1 online_brick_count; +##Let the brick processes starts +EXPECT_WITHIN $CHILD_UP_TIMEOUT "1" online_brick_count ##On brick restart only one HTIME should be found. EXPECT 1 count_htime_files; diff --git a/tests/bugs/ec/bug-1236065.t b/tests/bugs/ec/bug-1236065.t index 35e4e3d1cca..9395aa33e8c 100644 --- a/tests/bugs/ec/bug-1236065.t +++ b/tests/bugs/ec/bug-1236065.t @@ -48,7 +48,7 @@ TEST ec_test_make ## step 4 TEST $CLI volume start $V0 force -EXPECT '7' online_brick_count +EXPECT_WITHIN $CHILD_UP_TIMEOUT "7" online_brick_count # active heal EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status @@ -70,7 +70,7 @@ EXPECT '5' online_brick_count ## step 6 TEST $CLI volume start $V0 force -EXPECT '7' online_brick_count +EXPECT_WITHIN $CHILD_UP_TIMEOUT "7" online_brick_count # self-healing EXPECT_WITHIN $PROCESS_UP_TIMEOUT "Y" glustershd_up_status -- cgit