]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: avoid crashing on expected non-zero exit 45765/head
authorMoritz Röhrich <moritz.rohrich@suse.com>
Mon, 21 Mar 2022 16:32:25 +0000 (17:32 +0100)
committerMoritz Röhrich <moritz.rohrich@suse.com>
Wed, 13 Apr 2022 15:22:22 +0000 (17:22 +0200)
commita02be6f22fa18094cd8758700ab74581b6ce1701
treeee2ca2595f3dbd3a96f87e12f64d7a86323cd2b5
parent81bb0ec9a83bdf6660dc50f20732218688e89cc0
cephadm: avoid crashing on expected non-zero exit

- Avoid crashing when a call out to an external program expectedly does
  not return exit status zero.

There are programs that communicate other information than error/no
error through exit status. E.g. `systemctl status` will return different
exit codes depending on the actual status of the units in question.
In cases where this is expected crashing with a RuntimeError exception
is inappropriate and should be avoided.

Fixes: https://tracker.ceph.com/issues/55117
Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
qa/workunits/cephadm/test_cephadm.sh
src/cephadm/cephadm