diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-04-23 16:24:43 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-07 23:07:21 -0700 |
commit | 7c0c184be28e0cba08645c7106c6901b444651c9 (patch) | |
tree | ecb398a5d33813b5bfb4af3535f3877a195560b1 /xlators/mgmt/glusterd/src/glusterd-rebalance.c | |
parent | 9ba8963999bca431ec14a25961a163810cfe1e5b (diff) |
tiering: Do not allow some operations on tiered volume
Some operations like add-brick,remove-brick,rebalance,
replace-brick are not supported on tiered volume.
But there is no code level check for this. This patch
will allow to do the same
Change-Id: I12689f4e902cf0cceaf6f7f29c71057305024977
BUG: 1205624
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/10349
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-rebalance.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 84d9210a105..c14bcd156b4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -421,6 +421,15 @@ glusterd_rebalance_cmd_validate (int cmd, char *volname, goto out; } + ret = glusterd_disallow_op_for_tier (*volinfo, GD_OP_REBALANCE, cmd); + if (ret) { + gf_log ("glusterd", GF_LOG_ERROR, "Received rebalance command " + "on Tier volume %s", volname); + snprintf (op_errstr, len, "Rebalance operations are not " + "supported on a tiered volume"); + goto out; + } + ret = 0; out: |