]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
library: exit on user creation failure
authorDimitri Savineau <dsavinea@redhat.com>
Wed, 28 Jul 2021 16:27:00 +0000 (12:27 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 4 Aug 2021 15:41:29 +0000 (17:41 +0200)
commitde05060049c8bcd1ae07de94c952da53df121d18
tree91c29cefdc480f15f154416b25babb1c9d0f8489
parent561a7c02c07a04316ee27486f8c0a378fc5769c1
library: exit on user creation failure

When the ceph dashboard user creation fails then the issue is hidden
as we don't check the return code and don't print the error message
in the module output.

This ends up with a failure on the ceph dashboard set roles command saying
that the user doesn't exist.

By failing on the user creation, we will have an explicit explaination of
the issue (like weak password).

Closes: #6197
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 17784624e0fb02080e14d15b4105ef92a78ec8c4)
library/ceph_dashboard_user.py
tests/library/test_ceph_dashboard_user.py