]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: include min_mon_release and msgr v1 vs v2 addr count
authorSage Weil <sage@redhat.com>
Tue, 29 Oct 2019 16:14:30 +0000 (11:14 -0500)
committerJoao Eduardo Luis <joao@suse.com>
Thu, 12 Dec 2019 18:03:57 +0000 (18:03 +0000)
Signed-off-by: Sage Weil <sage@redhat.com>
(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

index e52543d0396ee003c63bcb41814ca25452afcc17..31dbfb81059235a674bcf117bf427bfd4e876d3a 100644 (file)
@@ -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