From ccdfa49c90d0adfd32f9f6d3443e8762e9cd6b0e Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 5 Aug 2015 16:02:49 +0530 Subject: glusterd: improve error logs for unsupported clients Backport of http://review.gluster.org/11831 Change-Id: I90be46a7b25cc3efd0e61c9a145852e9027f5f64 BUG: 1302521 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/11831 Reviewed-by: Pranith Kumar Karampuri Tested-by: Pranith Kumar Karampuri Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Prashanth Pai Reviewed-by: Kaushal M NetBSD-regression: NetBSD Build System Reviewed-on: http://review.gluster.org/13305 --- xlators/mgmt/glusterd/src/glusterd-utils.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 281aff8f867..5ccfcf44a76 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -10766,14 +10766,22 @@ glusterd_check_client_op_version_support (char *volname, uint32_t op_version, if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_UNSUPPORTED_VERSION, - "One or more clients " - "don't support the required op-version"); + "Client %s is running with min_op_version as %d and " + "max_op_version as %d and don't support the required " + "op-version %d", xprt->peerinfo.identifier, + xprt->peerinfo.min_op_version, + xprt->peerinfo.max_op_version, op_version); if (op_errstr) - ret = gf_asprintf (op_errstr, "One or more connected " - "clients cannot support the feature " - "being set. These clients need to be" - " upgraded or disconnected before " - "running this command again"); + ret = gf_asprintf (op_errstr, "One of the client %s is " + "running with op-version %d and " + "doesn't support the required " + "op-version %d. This client needs to" + " be upgraded or disconnected " + "before running this command again", + xprt->peerinfo.identifier, + xprt->peerinfo.max_op_version, + op_version); + return -1; } return 0; -- cgit