path: root/xlators/protocol/client/src/client-handshake.c
diff options
authorAvra Sengupta <>2016-06-27 12:40:17 +0530
committerJeff Darcy <>2016-06-28 13:27:23 -0700
commit10fa1bcce3b73f630dbc3241722c1af9dee4c414 (patch)
treec5316a24796b8a9b300e7ff48f484edcc34cb5af /xlators/protocol/client/src/client-handshake.c
parent5205d42ddfb67e22eab7fa54ac9b081bb1f8b1ec (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. Change-Id: I29e0a5c63b55380dc9db8e42852d7e95b64a2b2e BUG: 1350327 Signed-off-by: Avra Sengupta <> Reviewed-on: Reviewed-by: Raghavendra G <> CentOS-regression: Gluster Build System <> NetBSD-regression: NetBSD Build System <> Smoke: Gluster Build System <> Tested-by: Gluster Build System <>
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
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 5352e54..3284fac 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);