summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorAnoop C S <anoopcs@redhat.com>2018-02-13 12:23:39 +0530
committerAmar Tumballi <amarts@redhat.com>2018-02-14 17:04:50 +0000
commitc096bec4ec3f3ac33cc0787c60978944792e074e (patch)
tree0c7ab68d4ced0157969ef8b441d2a66ada40462f /xlators/protocol
parent7a4ca270af19124a262f93fafc367e3635da3c0b (diff)
protcol/client: Insert dummy clnt-lk-version to avoid upgrade failure
With https://review.gluster.org/#/c/12363/ being merged, we no longer send client's lk-version to server side and the corresponding check on server is also removed. But when clients are upgraded prior to servers, the check for lk-version at server side fails and is reported back to clients resulting in disconnection. Since we don't have lock-recovery (lk-version and grace-timeout) logic anymore in code base our best bet would be to add client's default lk-version i.e, 1, into the dictionary just to make server side check pass and continue with remaining SETVOLUME operations. Change-Id: I441b67bd271d1e9ba9a7c08703e651c7a6bd945b BUG: 1544699 Signed-off-by: Anoop C S <anoopcs@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-handshake.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index def95c15cf9..74c601bbcbd 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -1341,6 +1341,15 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc)
}
}
+ /* Insert a dummy key value pair to avoid failure at server side for
+ * clnt-lk-version with new clients.
+ */
+ ret = dict_set_uint32 (options, "clnt-lk-version", 1);
+ if (ret < 0) {
+ gf_msg (this->name, GF_LOG_WARNING, 0, PC_MSG_DICT_SET_FAILED,
+ "failed to set clnt-lk-version(1) in handshake msg");
+ }
+
ret = dict_set_int32 (options, "opversion", GD_OP_VERSION_MAX);
if (ret < 0) {
gf_msg (this->name, GF_LOG_ERROR, 0, PC_MSG_DICT_SET_FAILED,