]> git-server-git.apps.pok.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:17 +0000 (20:34 +0200)
commitadfb9d3b2a8680b038adff8dacb5064b47bdf933
tree85c62f79b73892a27b0b202a5d3a6697a2f344d5
parent48f47e7023c3d0066f66f766e68d5c97bdd0e0ab
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