diff options
author | Anoop C S <anoopcs@redhat.com> | 2018-03-02 10:32:17 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2018-03-02 18:54:33 +0000 |
commit | fecb0fc748806d4e6d61bcbef976acf473e55c82 (patch) | |
tree | 7293c0efbe2853aa72232a6d92cde710b174c863 /xlators/protocol | |
parent | fc35d400cba928de610b90adb5854dd1594fcd4a (diff) |
protocol/server: Insert dummy clnt-lk-version to avoid upgrade failure
This is required as we check for 'clnt-lk-version' in SETVOLUME callback
with older clients in place against newer servers. Change is similar to
what we have done via https://review.gluster.org/#/c/19560/.
Change-Id: If333c20cf9503f40687ec926c44c7e50222c05b5
BUG: 1544699
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index f6057da3b68..de90a6b8eda 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -838,6 +838,16 @@ server_setvolume (rpcsvc_request_t *req) if (ret) gf_msg_debug (this->name, 0, "failed to set 'process-uuid'"); + /* Insert a dummy key value pair to avoid failure at client side for + * clnt-lk-version with older clients. + */ + ret = dict_set_uint32 (reply, "clnt-lk-version", 0); + if (ret) { + gf_msg (this->name, GF_LOG_WARNING, 0, + PS_MSG_CLIENT_LK_VERSION_ERROR, "failed to set " + "'clnt-lk-version'"); + } + ret = dict_set_uint64 (reply, "transport-ptr", ((uint64_t) (long) req->trans)); if (ret) |