From: Orit Wasserman Date: Tue, 3 Nov 2015 09:09:38 +0000 (+0100) Subject: rgw: allow creating a bucket without current period X-Git-Tag: v10.1.0~354^2~250 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9acb629653b89bf0eaedbd42453c65bb002c913b;p=ceph.git rgw: allow creating a bucket without current period Signed-off-by: Orit Wasserman --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 763bc9e29e2b..2beffd042860 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4715,10 +4715,12 @@ int RGWRados::select_new_bucket_location(RGWUserInfo& user_info, const string& z { /* first check that rule exists within the specific zonegroup */ RGWZoneGroup zonegroup; - int ret = current_period.get_zonegroup(zonegroup, zonegroup_name); - if (ret < 0) { - ldout(cct, 0) << "could not find zonegroup " << zonegroup_name << " in zonegroup map" << dendl; - return ret; + if (!current_period.get_id().empty()) { + int ret = current_period.get_zonegroup(zonegroup, zonegroup_name); + if (ret < 0) { + ldout(cct, 0) << "could not find zonegroup " << zonegroup_name << " in zonegroup map" << dendl; + return ret; + } } /* now check that tag exists within zonegroup */