summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-06-27 12:40:17 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-07-05 04:57:59 -0700
commit50f8fd392badbec83196638045ed213e8f27e514 (patch)
tree66ef893f6b45a83812abcd5192ddf90d3a4150c4 /xlators/protocol
parent755b8c7e108a66211b876cf87a6f7fa244360b94 (diff)
protocol/server: Fix client/server compatibility
The 3.8 client expects a child_up key from the server indicating the status of the server translators. This key is not being sent by the servers running older versions, thereby breaking compatibility. With this patch we are treating the absence of the said key as an indication that the server trying to connect to this client is running an older version and hence in such a case we are setting conf->child_up as _gf_true explicitly. This should suffice in emulating the older behavior. Due to the nature of this bug, requiring two version to be reproducible, there are no testcases added for the same. > Reviewed-on: http://review.gluster.org/14811 > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit 10fa1bcce3b73f630dbc3241722c1af9dee4c414) Change-Id: I29e0a5c63b55380dc9db8e42852d7e95b64a2b2e BUG: 1350326 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14810 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-handshake.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 5352e549abf..3284facb893 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -1172,9 +1172,14 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
ret = dict_get_uint32 (reply, "child_up", &conf->child_up);
if (ret) {
+ /*
+ * This would happen in cases where the server trying to *
+ * connect to this client is running an older version. Hence *
+ * setting the child_up to _gf_true in this case. *
+ */
gf_msg (this->name, GF_LOG_WARNING, 0, PC_MSG_DICT_GET_FAILED,
"failed to find key 'child_up' in the options");
- goto out;
+ conf->child_up = _gf_true;
}
ret = dict_get_uint32 (reply, "clnt-lk-version", &lk_ver);