]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: fix 'auth caps' fallback 40140/head
authorSage Weil <sage@newdream.net>
Mon, 15 Mar 2021 22:34:57 +0000 (17:34 -0500)
committerSage Weil <sage@newdream.net>
Mon, 15 Mar 2021 22:34:57 +0000 (17:34 -0500)
The first get-or-create attempt also needs to tolerate failure.

Fixes: 8ceea1961f818dc2d07edf9c256ebe5150b6b133
Signed-off-by: Sage Weil <sage@newdream.net>
src/pybind/mgr/cephadm/services/cephadmservice.py
src/pybind/mgr/cephadm/tests/test_services.py

index 31a791ee884680364025159a4e977f2f9a0b8a61..53f89027603b354a82b3658228b53e4fa2cb0b20 100644 (file)
@@ -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,
index 2c2bdfb3584eb65aae58b22a6bc58b2b831458f7..e52a26729962463f7ae7595996842c438b150483 100644 (file)
@@ -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):