From caea65250325299f6ec5a4b5b2443a358ad6eba9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 4 Jun 2021 12:49:40 -0500 Subject: [PATCH] mgr/telemetry: pass leaderboard flag even w/o ident 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 (cherry picked from commit d4a6c3d0099a1f005f41a2cbcfbdbfeddd468db6) Fixes: https://tracker.ceph.com/issues/51189 --- src/pybind/mgr/telemetry/module.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 286c18b4f59b9..9df4a424f075b 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -440,7 +440,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, @@ -450,8 +450,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) -- 2.39.5