Merge pull request #46190 from rhcs-dashboard/smart-data-fix

mgr/dashboard: fix smart data error

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Paul Cuzner <pcuzner@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
This commit is contained in:
Ernesto Puerta 2022-05-10 17:55:58 +02:00 committed by GitHub
commit fd7d50c831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -249,7 +249,7 @@ class CephService(object):
# thus it is not relevant for us which daemon we are using.
# NOTE: the list may contain daemons that are 'down' or 'destroyed'.
for daemon in device['daemons']:
svc_type, svc_id = daemon.split('.')
svc_type, svc_id = daemon.split('.', 1)
if 'osd' in svc_type:
if daemon not in osd_daemons_up:
continue

View File

@ -160,7 +160,7 @@ CREATE TABLE DeviceHealthMetrics (
self.sleep_interval = 0.0
def is_valid_daemon_name(self, who: str) -> bool:
parts = who.split('.')
parts = who.split('.', 1)
if len(parts) != 2:
return False
return parts[0] in ('osd', 'mon')