]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/telemetry: handle daemons with complex ids 48283/head
authorLaura Flores <lflores@redhat.com>
Wed, 28 Sep 2022 17:43:40 +0000 (17:43 +0000)
committerLaura Flores <lflores@redhat.com>
Wed, 28 Sep 2022 17:43:40 +0000 (17:43 +0000)
commitc8e5ceb4bd8f3244668ef451ab426f55676bca49
treea623fcdebc8d7713960235ad0eb50c25617ea6d6
parentd007c663d49bb5bc76f0589f3c244392cda85189
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>
(cherry picked from commit 97833a6a81fed7f868e1d544816cfbdf254fdb43)
src/pybind/mgr/telemetry/module.py