]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph_key: handle error in a better way
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 7 Jun 2021 12:51:43 +0000 (14:51 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 30 Jun 2021 18:34:30 +0000 (20:34 +0200)
commit2957b69c8ba0c79b37cca541cbb3b777e89f5e7b
tree2f29695e2832b3098a7e285f1fe3e16d3d763f31
parenta348116bf7e5c7a81574bab4256833b841f43930
ceph_key: handle error in a better way

When calling the `ceph_key` module with `state: info`, if the ceph
command called fails, the actual error is hidden by the module which
makes it pretty difficult to troubleshoot.

The current code always states that if rc is not equal to 0 the keyring
doesn't exist.

`state: info` should always return the actual rc, stdout and stderr.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1964889
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit d58500ade01c7c4cc20b6bbaf8f5789d825b8d1b)
library/ceph_key.py
roles/ceph-mon/tasks/deploy_monitors.yml