diff options
| author | Atin Mukherjee <amukherj@redhat.com> | 2017-08-11 10:20:14 +0530 | 
|---|---|---|
| committer | Atin Mukherjee <amukherj@redhat.com> | 2017-08-16 17:02:48 +0000 | 
| commit | 204d52a4b6c13d16132f67ee94f823fa23c11538 (patch) | |
| tree | 1e0054ba34f2e19e868bc54183e26b41de4c731f | |
| parent | 9b11b90d30285942113bb1e2d2a662337a75511c (diff) | |
glusterd: improve op-version error message
In case of a heterogeneous cluster if an admin sets a volume option
which is higher than the current op-version the current error message
only displays the version number of the new tunable. Better use
experience is to dump the supported op-version in the error message as
well.
Change-Id: Ib42dadc574a401f79364178cb41ad21fb0b4432b
BUG: 1328994
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: https://review.gluster.org/18020
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Joe Julian <me@joejulian.name>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 7bb3d537097..a5d0477e00b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -994,7 +994,9 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)                                  ret = -1;                                  snprintf (errstr, sizeof (errstr),                                            "Required op_version (%d) is not " -                                          "supported", new_op_version); +                                          "supported. Max supported op version " +                                          "is %d", new_op_version, +                                          priv->op_version);                                  gf_msg (this->name, GF_LOG_ERROR, 0,                                          GD_MSG_UNSUPPORTED_VERSION, "%s",                                          errstr); @@ -1219,7 +1221,9 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)                                  ret = -1;                                  snprintf (errstr, sizeof (errstr),                                            "Required op_version (%d) is not " -                                          "supported", local_key_op_version); +                                          "supported. Max supported op version " +                                          "is %d", local_key_op_version, +                                          priv->op_version);                                  gf_msg (this->name, GF_LOG_ERROR, 0,                                          GD_MSG_VERSION_UNSUPPORTED,                                          "%s", errstr);  | 
