summaryrefslogtreecommitdiffstats
path: root/xlators/features/changetimerecorder
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawa@redhat.com>2017-05-25 21:43:42 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-05-31 20:43:53 +0000
commitdba55ae364a2772904bb68a6bd0ea87289ee1470 (patch)
treee8a7cf51bd45464cd26f9c4270787ffc50228854 /xlators/features/changetimerecorder
parentde92c363c95d16966dbcc9d8763fd4448dd84d13 (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/features/changetimerecorder')
-rw-r--r--xlators/features/changetimerecorder/src/changetimerecorder.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
index 574b627a825..1811cec420f 100644
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
@@ -2297,6 +2297,32 @@ out:
return 0;
}
+int
+notify (xlator_t *this, int event, void *data, ...)
+{
+
+ gf_ctr_private_t *priv = NULL;
+ int ret = 0;
+
+ priv = this->private;
+
+ if (!priv)
+ goto out;
+
+ if (event == GF_EVENT_CLEANUP) {
+ if (fini_db (priv->_db_conn)) {
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ CTR_MSG_CLOSE_DB_CONN_FAILED, "Failed closing "
+ "db connection");
+ }
+ } else {
+ ret = default_notify (this, event, data);
+ }
+out:
+ return ret;
+
+}
+
int32_t
mem_acct_init (xlator_t *this)
{