]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: pass leaderboard flag even w/o ident 41870/head
authorSage Weil <sage@newdream.net>
Fri, 4 Jun 2021 17:49:40 +0000 (12:49 -0500)
committerCory Snyder <csnyder@iland.com>
Tue, 15 Jun 2021 17:38:05 +0000 (13:38 -0400)
Allow non-identified clusters to appear in the leaderboard.
The leaderboard option still defaults to false, so the change here
is that if they opt in to leaderboard but not ident we'll see
that on the backend.

Note that a leaderboard still does not exist (yet), so this doesn't
have any immediate impact.  But if/when we do create one, it will
allow us to show big clusters (that opt in) on the leaderboard
as 'unidentified' or similar.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d4a6c3d0099a1f005f41a2cbcfbdbfeddd468db6)

src/pybind/mgr/telemetry/module.py

index d4fb9930853f8ba90f05af72c8d5f432b69e87d3..f025e94013a81d05951e2bbea413ca2ba1ea83d0 100644 (file)
@@ -441,7 +441,7 @@ class Module(MgrModule):
         if not channels:
             channels = self.get_active_channels()
         report = {
-            'leaderboard': False,
+            'leaderboard': self.leaderboard,
             'report_version': 1,
             'report_timestamp': datetime.utcnow().isoformat(),
             'report_id': self.report_id,
@@ -451,8 +451,6 @@ class Module(MgrModule):
         }
 
         if 'ident' in channels:
-            if self.leaderboard:
-                report['leaderboard'] = True
             for option in ['description', 'contact', 'organization']:
                 report[option] = getattr(self, option)