summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorVijaikumar M <vmallika@redhat.com>2014-07-24 12:47:04 +0530
committerKaushal M <kaushal@redhat.com>2014-07-24 05:03:37 -0700
commitddd132a3b20d650edbda318c773b6d54a04f6675 (patch)
tree0ae4a60076a88527af22cc123938a508dc68c273 /xlators/mgmt
parent6328019bd197efa25294194acaf946557d84f9fb (diff)
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: 1122816 Signed-off-by: Vijaikumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/8371 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index ed9933a587b..b40d7abc408 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -7275,6 +7275,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");