diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2018-02-08 09:09:00 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-02-09 03:27:02 +0000 |
commit | cb0339f9229fc5c05d7ef4cfcc4ca9c4569f3755 (patch) | |
tree | 2783ab7068b316d871e87f6cbcf995e81cb77b3a /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 2a004fbcc9296ee055b1957d1812552848ae7a0d (diff) |
glusterd: import volumes in separate synctask
With brick multiplexing, to attach a brick to an existing brick process
the prerequisite is to have the compatible brick to finish it's
initialization and portmap sign in and hence the thread might have to go
to a sleep and context switch the synctask to allow the brick process to
communicate with glusterd. In normal code path, this works fine as
glusterd_restart_bricks () is launched through a separate synctask.
In case there's a mismatch of the volume when glusterd restarts,
glusterd_import_friend_volume is invoked and then it tries to call
glusterd_start_bricks () from the main thread which eventually may land
into the similar situation. Now since this is not done through a
separate synctask, the 1st brick will never be able to get its turn to
finish all of its handshaking and as a consequence to it, all the bricks
will fail to get attached to it.
Solution : Execute import volume and glusterd restart bricks in separate
synctask. Importing snaps had to be also done through synctask as
there's a dependency of the parent volume need to be available for the
importing snap functionality to work.
Change-Id: I290b244d456afcc9b913ab30be4af040d340428c
BUG: 1540607
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index d56727744cb..e7a4c80a635 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -197,6 +197,7 @@ typedef struct { int32_t workers; uint32_t blockers; uint32_t mgmt_v3_lock_timeout; + gf_boolean_t restart_bricks; } glusterd_conf_t; @@ -1081,7 +1082,7 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo, dict_t *volumes, int count); int -glusterd_restart_bricks (glusterd_conf_t *conf); +glusterd_restart_bricks (); int32_t glusterd_volume_txn (rpcsvc_request_t *req, char *volname, int flags, |