From: Orit Wasserman Date: Sun, 28 May 2017 07:42:54 +0000 (+0300) Subject: rgw: run resharding thread only on master zone X-Git-Tag: ses5-milestone6~8^2~7^2~9 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=dc04b20f1dff432bf797d02b9c9171bba9009283;p=ceph.git rgw: run resharding thread only on master zone Signed-off-by: Orit Wasserman --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 38bf77a89f42f..cabf60dcc7e22 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4385,7 +4385,7 @@ int RGWRados::init_complete() zone_id_by_name[z.name] = id; zone_by_id[id] = z; } - + if (zone_by_id.find(zone_id()) == zone_by_id.end()) { ldout(cct, 0) << "WARNING: could not find zone config in zonegroup for local zone (" << zone_id() << "), will use defaults" << dendl; } @@ -4543,7 +4543,10 @@ int RGWRados::init_complete() reshard_wait = std::make_shared(this); reshard = new RGWReshard(this); - if (run_reshard_thread) { + + /* only the master zone in the zonegroup reshards buckets */ + run_reshard_thread = run_reshard_thread && (get_zonegroup().master_zone == zone_public_config.id); + if (run_reshard_thread) { reshard->start_processor(); }