Treating daemons as `<daemon_type>.x` caused a crash
in the Telemetry module since the current method does not cover a case
where a daemon id is more complex, i.e. `<daemon_type>.x.y`.
When we parse the daemon type and daemon id, we should
split it into a maximum of two pieces rather than splitting
it by every `.` character. Specifying `1` in the Python
.split() function will limit the split to a maximum of two items.
Fixes: https://tracker.ceph.com/issues/57700
Signed-off-by: Laura Flores <lflores@redhat.com>
# Grab output from the "daemon.x heap stats" command
for daemon in daemons:
- daemon_type, daemon_id = daemon.split('.')
+ daemon_type, daemon_id = daemon.split('.', 1)
heap_stats = self.parse_heap_stats(daemon_type, daemon_id)
if heap_stats:
if (daemon_type != 'osd'):
# Grab output from the "dump_mempools" command
for daemon in daemons:
- daemon_type, daemon_id = daemon.split('.')
+ daemon_type, daemon_id = daemon.split('.', 1)
cmd_dict = {
'prefix': 'dump_mempools',
'format': 'json'