]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/orchestrator/cli: fix OrchestratorError retval sign 67515/head
authorNitzanMordhai <nmordech@ibm.com>
Wed, 4 Mar 2026 14:08:54 +0000 (14:08 +0000)
committerPatrick Donnelly <pdonnell@ibm.com>
Fri, 8 May 2026 19:52:54 +0000 (15:52 -0400)
commit6f067d0fcbd18c6ddcb3d74e25fc1cecce557ec0
treedbec602ec60ebee51a4ef7946234eaf7245d31e4
parentbaafb66e03a0a5468bc46d552a4d902e0bc0a070
pybind/orchestrator/cli: fix OrchestratorError retval sign

OrchestratorError stores errno as abs(), so e.errno is always positive.
Returning retval=e.errno (+22) caused the ceph CLI to exit 0 since it
only propagates the exit code when ret < 0.

Fix by returning retval=-e.errno.

Fixes: https://tracker.ceph.com/issues/75282
Signed-off-by: Nitzan Mordhai <nmordech@redhat.com>
(cherry picked from commit 18546fa92a04f81ba0d85b57554e0291285fe02f)
src/pybind/mgr/orchestrator/cli.py