]> 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@ibm.com>
Tue, 14 Feb 2023 09:52:14 +0000 (10:52 +0100)
commiteadef1cec7f3a362e960d90522a38ae2b6a88bda
tree9796cf2759a4900bbc4425dd12a2ef5e424b5a92
parentd2b3fe44eae8ee671c7935e6f6631758234828c1
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