]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: metadata sync info should be shown at master zone of slave zonegroup 12187/head
authorJing Wenjun <jingwenjun@cmss.chinamobile.com>
Fri, 25 Nov 2016 13:31:22 +0000 (21:31 +0800)
committerJing Wenjun <jingwenjun@cmss.chinamobile.com>
Wed, 30 Nov 2016 16:18:13 +0000 (00:18 +0800)
When executing 'radosgw-admin sync status', the metadata sync info should be shown on the srceen at master zone of slave zonegroup.

Using the function store->is_meta_master() instead of 'zonegroup.is_master && zone.id == zonegroup.master_zone'

Fixes: http://tracker.ceph.com/issues/18091
Signed-off-by: Jing Wenjun <jingwenjun@cmss.chinamobile.com>
src/rgw/rgw_admin.cc

index ab0b94d805bd61975b3bc586556faff5c7ebc8c4..93c70a053ac7b06ba633ad88f784d833d75729d3 100644 (file)
@@ -1975,7 +1975,7 @@ static void sync_status(Formatter *formatter)
 
   list<string> md_status;
 
-  if (zone.id == zonegroup.master_zone) {
+  if (store->is_meta_master()) {
     md_status.push_back("no sync (zone is master)");
   } else {
     get_md_sync_status(md_status);