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:57:48 +0000 |
commit | cec4c7f19b7b8cfd69fb439201658b654dcb4168 (patch) | |
tree | 3e2ee211676e7837b6d571db95a7cba2b6ce07ab /xlators | |
parent | 8b85778185440b0f997d9c40b20a728844888886 (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/.
(cherry picked from commit fecb0fc748806d4e6d61bcbef976acf473e55c82)
Change-Id: If333c20cf9503f40687ec926c44c7e50222c05b5
BUG: 1551112
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Diffstat (limited to 'xlators')
-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) |