]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/telemetry: handle daemons with complex ids 48282/head
authorLaura Flores <lflores@redhat.com>
Wed, 28 Sep 2022 17:17:17 +0000 (17:17 +0000)
committerLaura Flores <lflores@redhat.com>
Wed, 28 Sep 2022 17:17:17 +0000 (17:17 +0000)
commit97833a6a81fed7f868e1d544816cfbdf254fdb43
tree2589c8141400095b4add8d15b17502a71637c8c1
parent652bf75409c45c34ae939b241b00adba20f12869
mgr/telemetry: handle daemons with complex ids

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>
src/pybind/mgr/telemetry/module.py