From: Sage Weil Date: Tue, 29 Oct 2019 16:14:30 +0000 (-0500) Subject: mgr/telemetry: include min_mon_release and msgr v1 vs v2 addr count X-Git-Tag: v12.2.13~15^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=64479a3ff5150e4a52016a66dba2b4d2d095e06b;p=ceph.git mgr/telemetry: include min_mon_release and msgr v1 vs v2 addr count Signed-off-by: Sage Weil (cherry picked from commit 3453930d438dc3ba9ba5addca59aec6786293bd4) Note: This commit was heavily modified. We wanted to provide the number of ipv4 and ipv6 monitors in the report, so we rewrote that part so we can report on it; but we had to drop everything else (msgr1 and msgr2), as well as 'min_mon_release'. Those do not exist in luminous. In the end, the commit message itself is misleading, but we are somehow (*shrug*) opting for leaving the commit as the original. Additionally, we removed PendingReleaseNotes changes to prevent conflicts in the future. --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index e52543d0396ee..31dbfb8105923 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -297,9 +297,19 @@ class Module(MgrModule): report['created'] = mon_map['created'] + ipv4_mons = 0 + ipv6_mons = 0 + for mon in mon_map['mons']: + if mon['public_addr'].startswith('['): + ipv6_mons += 1 + else: + ipv4_mons += 1 + report['mon'] = { 'count': len(mon_map['mons']), - 'features': mon_map['features'] + 'features': mon_map['features'], + 'ipv4_addr_mons': ipv4_mons, + 'ipv6_addr_mons': ipv6_mons, } num_pg = 0