New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: check placement target existence during bucket creation #16384

Merged
merged 1 commit into from Jul 27, 2017

Conversation

Projects
None yet
4 participants
@mikulely
Contributor

mikulely commented Jul 18, 2017

when the placement target has been specified explicitly,we
need to check whether it exists.

Signed-off-by: Jiaying Ren jiaying.ren@umcloud.com

Related to #15790

@mikulely mikulely changed the title from rgw: check placement target existness during bucket creation to rgw: check placement target existence during bucket creation Jul 18, 2017

@@ -2524,6 +2524,17 @@ void RGWCreateBucket::execute()
return;
}
if(!placement_rule.empty()) {
if (!store->get_zonegroup().has_placement_target(placement_rule)) {

This comment has been minimized.

@cbodley

cbodley Jul 18, 2017

Contributor

could avoid the new has_placement_target() and reduce a level of nesting with:

  const auto& zonegroup = store->get_zonegroup();
  if (!placement_rule.empty() &&
      !zonegroup.placement_targets.count(placement_rule)) {

This comment has been minimized.

@mikulely

mikulely Jul 19, 2017

Contributor

@cbodley Thanks, addressed.

rgw: check placement target existence during bucket creation
when the placement target has been specified explicitly,we
need to check whether it exists.

Signed-off-by: Jiaying Ren <jiaying.ren@umcloud.com>
@mikulely

This comment has been minimized.

Contributor

mikulely commented Jul 25, 2017

@cbodley ping

@yuriw yuriw merged commit 105435a into ceph:master Jul 27, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment