From: Yehuda Sadeh Date: Fri, 26 Aug 2016 21:54:06 +0000 (-0700) Subject: rgw: setting sync-from zone by name not by id X-Git-Tag: v11.1.0~681^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ef728a1a3f80a413bcb4bf15ec911b401dbf732;p=ceph.git rgw: setting sync-from zone by name not by id Using the zone name is easier and clearer. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 7d1c3aa2cb0e..60d3e81ea745 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -216,9 +216,9 @@ void _usage() cout << " unset zone tier config keys\n"; cout << " --tier_type= zone tier type\n"; cout << " --sync-from-all[=false] set/reset whether zone syncs from all zonegroup peers\n"; - cout << " --sync-from=[zone-id][,...]\n"; + cout << " --sync-from=[zone-name][,...]\n"; cout << " set list of zones to sync from\n"; - cout << " --sync-from-rm=[zone-id][,...]\n"; + cout << " --sync-from-rm=[zone-name][,...]\n"; cout << " remove zones from list of zones to sync from\n"; cout << " --fix besides checking bucket index, will also fix it\n"; cout << " --check-objects bucket check: rebuilds bucket index according to\n"; diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index af003c7f6a9d..8d48499c7322 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -3722,7 +3722,7 @@ int RGWRados::init_zg_from_local(bool *creating_defaults) bool RGWRados::zone_syncs_from(RGWZone& target_zone, RGWZone& source_zone) { - return target_zone.syncs_from(source_zone.id) && + return target_zone.syncs_from(source_zone.name) && sync_modules_manager->supports_data_export(source_zone.tier_type); } diff --git a/src/test/cli/radosgw-admin/help.t b/src/test/cli/radosgw-admin/help.t index 15aaa6ccbe1e..e595db55cecf 100644 --- a/src/test/cli/radosgw-admin/help.t +++ b/src/test/cli/radosgw-admin/help.t @@ -167,9 +167,9 @@ unset zone tier config keys --tier_type= zone tier type --sync-from-all[=false] set/reset whether zone syncs from all zonegroup peers - --sync-from=[zone-id][,...] + --sync-from=[zone-name][,...] set list of zones to sync from - --sync-from-rm=[zone-id][,...] + --sync-from-rm=[zone-name][,...] remove zones from list of zones to sync from --fix besides checking bucket index, will also fix it --check-objects bucket check: rebuilds bucket index according to