[Bugs] [Bug 1585391] glusteshd wrong status caused by gluterd big lock

bugzilla at redhat.com bugzilla at redhat.com
Sat Jun 2 13:38:25 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1585391

Worker Ant <bugzilla-bot at gluster.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|POST                        |MODIFIED



--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/20131 committed in master by "Atin
Mukherjee" <amukherj at redhat.com> with a commit message- glusterd: gluster v
status is showing wrong status for glustershd

When we restart the bricks, connect and disconnect events happen
for glustershd. glusterd use two threads to handle disconnect and
connects events from glustershd. When we restart the bricks we'll
get both disconnect and connect events. So both the threads will
compete for the big lock.

We want disconnect event to finish before connect event. But If
connect thread gets the big lock first, it sets svc->online to
true, and then disconnect thread will et svc->online to false.
So, glustershd will be disconnected from glusterd and wrong status
is shown.

After killing shd, glusterd sleeps for 1 second. To avoid the problem,
If glusterd releses the lock before sleep and acquires it after sleep,
disconnect thread will get a chance to handle the
glusterd_svc_common_rpc_notify before other thread completes connect
event.

Change-Id: Ie82e823fdfc936feb7c0ae10599297b050ee9986
fixes: bz#1585391
Signed-off-by: Sanju Rakonde <srakonde at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list