diff options
| author | Mohit Agrawal <moagrawa@redhat.com> | 2017-05-25 21:43:42 +0530 | 
|---|---|---|
| committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-05-31 20:43:53 +0000 | 
| commit | dba55ae364a2772904bb68a6bd0ea87289ee1470 (patch) | |
| tree | e8a7cf51bd45464cd26f9c4270787ffc50228854 /xlators/protocol/server/src/server.h | |
| parent | de92c363c95d16966dbcc9d8763fd4448dd84d13 (diff) | |
glusterfs: Not able to mount running volume after enable brick mux and stopped any volume
Problem: After enabled brick mux if any volume has down and then try ot run mount
         with running volume , mount command is hung.
Solution: After enable brick mux server has shared one data structure server_conf
          for all associated subvolumes.After down any subvolume in some
          ungraceful manner (remove brick directory) posix xlator sends
          GF_EVENT_CHILD_DOWN event to parent xlatros and server notify
          updates the child_up to false in server_conf.When client is trying
          to communicate with server through mount it checks conf->child_up
          and it is FALSE so it throws message "translator are not yet ready".
          From this patch updated structure server_conf to save child_up status
          for xlator wise. Another improtant correction from this patch is
          cleanup threads from server side xlators after stop the volume.
BUG: 1453977
Change-Id: Ic54da3f01881b7c9429ce92cc569236eb1d43e0d
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
Reviewed-on: https://review.gluster.org/17356
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/protocol/server/src/server.h')
| -rw-r--r-- | xlators/protocol/server/src/server.h | 10 | 
1 files changed, 7 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index 0b37eb1414a..09a2d74ff2b 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -73,6 +73,12 @@ struct _volfile_ctx {          uint32_t             checksum;  }; +struct _child_status { +        struct list_head status_list; +        char *name; +        gf_boolean_t child_up; + +};  struct server_conf {          rpcsvc_t               *rpc;          struct rpcsvc_config    rpc_conf; @@ -101,9 +107,7 @@ struct server_conf {                                              * in case if volume set options                                              * (say *.allow | *.reject) are                                              * tweeked */ -        gf_boolean_t            child_up; /* Set to true, when child is up, and -                                           * false, when child is down */ - +        struct _child_status    *child_status;          gf_lock_t               itable_lock;  };  typedef struct server_conf server_conf_t;  | 
