]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw-admin: don't init zonegroup on zone default command
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 29 Jun 2021 21:03:18 +0000 (14:03 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 6 Aug 2021 19:00:22 +0000 (12:00 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc

index 8045c71bafc204efc5a3a3cc868d2fb3659292cd..6350e49315c17b442dc01cfdd032fcdf9037dda3 100644 (file)
@@ -5140,17 +5140,12 @@ int main(int argc, const char **argv)
       break;
     case OPT::ZONE_DEFAULT:
       {
-       RGWZoneGroup zonegroup(zonegroup_id,zonegroup_name);
-       int ret = zonegroup.init(dpp(), g_ceph_context, static_cast<rgw::sal::RadosStore*>(store)->svc()->sysobj, null_yield);
-       if (ret < 0) {
-         cerr << "WARNING: failed to initialize zonegroup " << zonegroup_name << std::endl;
-       }
        if (zone_id.empty() && zone_name.empty()) {
          cerr << "no zone name or id provided" << std::endl;
          return EINVAL;
        }
        RGWZoneParams zone(zone_id, zone_name);
-       ret = zone.init(dpp(), g_ceph_context, static_cast<rgw::sal::RadosStore*>(store)->svc()->sysobj, null_yield);
+       int ret = zone.init(dpp(), g_ceph_context, static_cast<rgw::sal::RadosStore*>(store)->svc()->sysobj, null_yield);
        if (ret < 0) {
          cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
          return -ret;