]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/cephadm: safe status/health access in node-proxy agent and inventory
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 29 Jan 2026 12:14:40 +0000 (13:14 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 18 Feb 2026 08:52:38 +0000 (09:52 +0100)
commit576817410ffa41afda6b7d0b971b61d8f6a432ce
tree94028598b612abec4451f3ccd3b774c42203aea6
parentef9405850b96bd45c4dc1de04d9f7e77f642e76d
mgr/cephadm: safe status/health access in node-proxy agent and inventory

This adds helpers in NodeProxyEndpoint and NodeProxyCache to safely
read status.health and status.state.

In NodeProxyEndpoint, methods _get_health_value() and _get_state_value()
are used in get_nok_members() to avoid KeyError on malformed data.

In NodeProxyCache, _get_health_value(), _has_health_value(),
_is_error_status(), and _is_unknown_status() are used in fullreport()
and when filtering 'non ok' members instead of accessing
status['status']['health'] inline.

Fixes: https://tracker.ceph.com/issues/74749
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/pybind/mgr/cephadm/agent.py
src/pybind/mgr/cephadm/inventory.py
src/pybind/mgr/cephadm/utils.py