From 8e9847d8c98e76dea6562ff5340f22c00bc6ebc6 Mon Sep 17 00:00:00 2001 From: Vijaikumar M Date: Thu, 24 Jul 2014 12:47:04 +0530 Subject: glusterd/snapshot: Print correct error message on cli for snapshot operation performed on a cluster with op-version less than 30600. Currently we get error message as on cli 'Another transaction is in progress Please try again after sometime' when a snapshot operation is performed on a cluster with op-version less than 30600. We need to print the correct error message in this case. Change-Id: I5f144428d928393c3796bde96ce6e3a40fca8141 BUG: 1145068 Signed-off-by: Vijaikumar M Reviewed-on: http://review.gluster.org/8371 Reviewed-by: Avra Sengupta Reviewed-by: Sachin Pandit Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System Reviewed-by: Kaushal M Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/8796 --- xlators/mgmt/glusterd/src/glusterd-snapshot.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 79242afc500..f32b3140612 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -7279,6 +7279,16 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req) goto out; } + if (conf->op_version < GD_OP_VERSION_3_6_0) { + snprintf (err_str, sizeof (err_str), "Cluster operating version" + " is lesser than the supported version " + "for a snapshot"); + gf_log (this->name, GF_LOG_ERROR, "%s (%d < %d)", err_str, + conf->op_version, GD_OP_VERSION_3_6_0); + ret = -1; + goto out; + } + ret = dict_get_int32 (dict, "type", &type); if (ret < 0) { snprintf (err_str, sizeof (err_str), "Command type not found"); -- cgit