From b2e14374e20440d8d298c3bdb7d8290354330967 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Tue, 20 Sep 2011 13:23:08 +0530 Subject: glusterfs protocol: handshake to log the version of the peer * As RPC program's name is just used for logging, we now have 'PACKAGE_VERSION' part of the string, which gets logged in client side. * From client, we send the PACKAGE_VERSION in handshake dictionary, which gets logged on serverside handshake. The change doesn't break any compatibility between client or server as it would only enhance the logging part of handshake. Change-Id: Ie7f498af2f5d3f97be37c8d982061cb6021883ce BUG: 3589 Reviewed-on: http://review.gluster.com/468 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client-handshake.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/protocol/client/src/client-handshake.c') diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 51467f3d185..b18d3a27e7e 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -994,6 +994,7 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) "asprintf failed while setting process_uuid"); goto fail; } + ret = dict_set_dynstr (options, "process-uuid", process_uuid_xl); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, @@ -1002,6 +1003,13 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) goto fail; } + ret = dict_set_str (options, "client-version", PACKAGE_VERSION); + if (ret < 0) { + gf_log (this->name, GF_LOG_WARNING, + "failed to set client-version(%s) in handshake msg", + PACKAGE_VERSION); + } + if (this->ctx->cmd_args.volfile_server) { if (this->ctx->cmd_args.volfile_id) { ret = dict_set_str (options, "volfile-key", -- cgit