except SendCommandError:
# Try to retrieve SMART data from another daemon.
continue
- else:
+ elif 'mon' in svc_type:
try:
dev_smart_data = CephService.send_command(
- svc_type, 'device get-health-metrics', svc_id, devid=device['devid'])
+ svc_type, 'device query-daemon-health-metrics', who=daemon)
except SendCommandError:
# Try to retrieve SMART data from another daemon.
continue
+ else:
+ dev_smart_data = {}
for dev_id, dev_data in dev_smart_data.items():
if 'error' in dev_data:
logger.warning(
]
CephService._get_smart_data_by_device({'devid': '1', 'daemons': ['osd.1', 'mon.1']})
send_command.assert_has_calls([mock.call('mon', 'osd tree'),
- mock.call('mon', 'device get-health-metrics', '1', devid='1')])
+ mock.call('osd', 'smart', '1', devid='1'),
+ mock.call('mon', 'osd tree'),
+ mock.call('mon', 'device query-daemon-health-metrics',
+ who='mon.1')])