diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-09-10 11:27:42 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2015-09-14 11:23:29 -0700 |
commit | fdf5c159abafd156f47a6c0bd3e7c955b005b285 (patch) | |
tree | 2b25a6a8a79872d50b1bc3202dd451282727a6c8 /xlators | |
parent | 23e522eea17e15b37d395e2005139dd3d5a9e3a1 (diff) |
tier/glusterd : Disable subvol match check during detach tier
For tiering, user does not have authorization to choose
for bricks to detach, so we don't need to whether subvols
match for the bricks or not.
Back port of >>
>Change-Id: I7e777ccc1aa261f652f9b158718fcd55185c7794
>BUG: 1261741
>Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
>Reviewed-on: http://review.gluster.org/12145
>Reviewed-by: Dan Lambright <dlambrig@redhat.com>
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>Tested-by: Gluster Build System <jenkins@build.gluster.com>
>Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
(cherry picked from commit 2e041639d8e49e2b768dd43c6f702106250e4da9)
Change-Id: I0819caceb3aad88e242cf62faab471fafd62c63f
BUG: 1261742
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/12173
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 834be85fb36..08bda17acfa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -995,8 +995,10 @@ __glusterd_handle_remove_brick (rpcsvc_request_t *req) strcpy (brick_list, " "); + /* subvol match is not required for tiered volume*/ if ((volinfo->type != GF_CLUSTER_TYPE_NONE) && - (volinfo->subvol_count > 1)) { + (volinfo->type != GF_CLUSTER_TYPE_TIER) && + (volinfo->subvol_count > 1)) { ret = subvol_matcher_init (&subvols, volinfo->subvol_count); if (ret) goto out; @@ -1036,13 +1038,19 @@ __glusterd_handle_remove_brick (rpcsvc_request_t *req) (volinfo->brick_count <= volinfo->dist_leaf_count)) continue; - /* Find which subvolume the brick belongs to */ - subvol_matcher_update (subvols, volinfo, brickinfo); + /* Find which subvolume the brick belongs to. + * subvol match is not required for tiered volume + * + */ + if (volinfo->type != GF_CLUSTER_TYPE_TIER) + subvol_matcher_update (subvols, volinfo, brickinfo); } /* Check if the bricks belong to the same subvolumes.*/ - if ((volinfo->type != GF_CLUSTER_TYPE_NONE) && - (volinfo->subvol_count > 1)) { + /* subvol match is not required for tiered volume*/ + if ((volinfo->type != GF_CLUSTER_TYPE_NONE) && + (volinfo->type != GF_CLUSTER_TYPE_TIER) && + (volinfo->subvol_count > 1)) { ret = subvol_matcher_verify (subvols, volinfo, err_str, sizeof(err_str), vol_type, replica_count); |