]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: fix host-maintenance command always exiting with a failure 58755/head
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 27 Mar 2024 22:45:15 +0000 (18:45 -0400)
committerAdam King <adking@redhat.com>
Tue, 23 Jul 2024 16:13:31 +0000 (12:13 -0400)
commit9f37bf230312ce9d185953a9de895b5f0b74299a
tree571e7a035ac529d30373df7575b97dffc0fe3250
parentbc3f96b4d8985987fafad1495e023562ad9e61c1
cephadm: fix host-maintenance command always exiting with a failure

The host-maintenance command would always fail because
command_maintenance always returns a string. This string is passed to
sys.exit and thus always gets printed and causes a non-zero exit code.
Fix the command line behavior by renaming the original function and
adding a new command_maintenance that prints the string and returns an
int like other command_* functions do.

Fixes: https://tracker.ceph.com/issues/65122
Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit 0a137b140e47d02b03d133adb55e62aa0de7b984)

Conflicts:
src/cephadm/cephadm.py
src/cephadm/tests/test_cephadm.py
src/cephadm/cephadm
src/cephadm/tests/test_cephadm.py