From: Casey Bodley Date: Wed, 3 Mar 2021 21:55:23 +0000 (-0500) Subject: radosgw-admin: 'sync status' shows enabled/disabled zonegroup features X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=981f53ae36856629b1e910c86bade88323814595;p=ceph.git radosgw-admin: 'sync status' shows enabled/disabled zonegroup features Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index bc0699aeed1ed..6443ef4c4d64e 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2419,6 +2419,16 @@ static void tab_dump(const string& header, int width, const list& entrie } } +// return features that are supported but not enabled +static auto get_disabled_features(const rgw::zone_features::set& enabled) { + auto features = rgw::zone_features::set{rgw::zone_features::supported.begin(), + rgw::zone_features::supported.end()}; + for (const auto& feature : enabled) { + features.erase(feature); + } + return features; +} + static void sync_status(Formatter *formatter) { @@ -2432,6 +2442,11 @@ static void sync_status(Formatter *formatter) cout << std::setw(width) << "zonegroup" << std::setw(1) << " " << zonegroup.get_id() << " (" << zonegroup.get_name() << ")" << std::endl; cout << std::setw(width) << "zone" << std::setw(1) << " " << zone.id << " (" << zone.name << ")" << std::endl; + cout << std::setw(width) << "zonegroup features enabled: " << zonegroup.enabled_features << std::endl; + if (auto d = get_disabled_features(zonegroup.enabled_features); !d.empty()) { + cout << std::setw(width) << " disabled: " << d << std::endl; + } + list md_status; if (store->is_meta_master()) {