diff options
author | Vijaikumar M <vmallika@redhat.com> | 2014-07-24 12:47:04 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-23 02:00:40 -0700 |
commit | 8e9847d8c98e76dea6562ff5340f22c00bc6ebc6 (patch) | |
tree | 1995e42cb86ae16b2638376040d3a3089d0dc380 /xlators | |
parent | b98ed29cf6c1b999a025dff2269118a9198bd987 (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: 1145068
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>
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8796
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 10 |
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 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"); |