From 19c75234433c4ce5073a13dbada88f437c2dd0ad Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 Mar 2021 17:34:57 -0500 Subject: [PATCH] mgr/cephadm: fix 'auth caps' fallback The first get-or-create attempt also needs to tolerate failure. Fixes: 8ceea1961f818dc2d07edf9c256ebe5150b6b133 Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/services/cephadmservice.py | 2 +- src/pybind/mgr/cephadm/tests/test_services.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index 31a791ee88468..53f89027603b3 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -144,7 +144,7 @@ class CephadmService(metaclass=ABCMeta): return DaemonDescription() def get_keyring_with_caps(self, entity: AuthEntity, caps: List[str]) -> str: - ret, keyring, err = self.mgr.check_mon_command({ + ret, keyring, err = self.mgr.mon_command({ 'prefix': 'auth get-or-create', 'entity': entity, 'caps': caps, diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 2c2bdfb3584eb..e52a267299624 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -115,7 +115,7 @@ class TestCephadmService: 'entity': 'client.iscsi.a', 'caps': expected_caps}) - assert expected_call in mgr.check_mon_command.mock_calls + assert expected_call in mgr.mon_command.mock_calls assert expected_call2 in mgr.mon_command.mock_calls def test_get_auth_entity(self): -- 2.39.5