From 64479a3ff5150e4a52016a66dba2b4d2d095e06b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 29 Oct 2019 11:14:30 -0500 Subject: [PATCH] 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. --- src/pybind/mgr/telemetry/module.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.39.5