From c05e6321715e261ee32268128e1c21f696c842d9 Mon Sep 17 00:00:00 2001 From: Orit Wasserman Date: Tue, 13 Oct 2015 14:08:14 +0200 Subject: [PATCH] radosgw-admin: fix zone create to check for zonegroup name Signed-off-by: Orit Wasserman --- src/rgw/rgw_admin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 5fe417fecd396..2db8a32fe0fef 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2597,7 +2597,7 @@ int main(int argc, char **argv) RGWRealm realm(realm_id, realm_name); RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name); /* if the user didn't provide zonegroup info , create stand alone zone */ - if (!zonegroup_id.empty() || !zonegroup_id.empty()) { + if (!zonegroup_id.empty() || !zonegroup_name.empty()) { ret = zonegroup.init(g_ceph_context, store); if (ret < 0) { cerr << "unable to initialize zonegroup " << zonegroup_name << ": " << cpp_strerror(-ret) << std::endl; @@ -2625,7 +2625,7 @@ int main(int argc, char **argv) return ret; } - if (!zonegroup_id.empty() || !zonegroup_id.empty()) { + if (!zonegroup_id.empty() || !zonegroup_name.empty()) { ret = zonegroup.add_zone(zone); if (ret < 0) { cerr << "failed to add zone " << zone_name << " to zonegroup " << zonegroup.get_name() << ": " -- 2.39.5