From: weiqiaomiao Date: Tue, 6 Sep 2016 08:34:52 +0000 (+0800) Subject: rgw: fix failed to create bucket if a non-master zonegroup has a single zone X-Git-Tag: v10.2.8~38^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c49b114e8dde6c3f3c5a5b663bd8299b4f2feafb;p=ceph.git rgw: fix failed to create bucket if a non-master zonegroup has a single zone If a non-master zonegroup has a single zone, the metadata sync thread not running and the non-master zonegroup can't sync user from master zonegroup, so we can't create bucket(or other metadata update) in it because the authenticated user not found in the zone of non-master zonegroup. Signed-off-by: weiqiaomiao (cherry picked from commit 949af79b21098e6410bc29274cf36eae2d89faea) Conflicts: src/rgw/rgw_rados.cc - retain d32654b7cd60ccc4e23d3f05b9e4385a697bacd6 which was merged after this commit --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index f8e8db293273..334648c61079 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3861,9 +3861,9 @@ int RGWRados::init_complete() meta_mgr->init_oldest_log_period(); } - /* not point of running sync thread if there is a single zone or - we don't have a master zone configured or there is no rest_master_conn */ - if (get_zonegroup().zones.size() < 2 || get_zonegroup().master_zone.empty() || !rest_master_conn) { + /* no point of running sync thread if we don't have a master zone configured + or there is no rest_master_conn */ + if (get_zonegroup().master_zone.empty() || !rest_master_conn) { run_sync_thread = false; }