summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-06-27 12:40:17 +0530
committerJeff Darcy <jdarcy@redhat.com>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 <asengupt@redhat.com> 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>
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-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 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);