]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: ensure nfs uses the correct entity
authorMichael Fritch <mfritch@suse.com>
Fri, 13 Mar 2020 20:19:23 +0000 (14:19 -0600)
committerMichael Fritch <mfritch@suse.com>
Wed, 25 Mar 2020 22:26:13 +0000 (16:26 -0600)
mon entity needs to start with `client.`

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/pybind/mgr/cephadm/__init__.py
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/nfs.py

index f390f18c16aaacde7e142cd485dacdc48135f23c..4d7a2fcb659dae2b5fedb316b33ffdf2dfded698 100644 (file)
@@ -3,4 +3,4 @@ import os
 if 'UNITTEST' in os.environ:
     import tests
 
-from .module import CephadmOrchestrator
+from .module import CephadmOrchestrator, name_to_config_section
index 333cd53a79dc199bbc11f66efd7584d1fdbc5152..1f1fd4527d4b67e28af174d77efe6b67898c78ff 100644 (file)
@@ -102,7 +102,7 @@ def name_to_config_section(name):
     Map from daemon names to ceph entity names (as seen in config)
     """
     daemon_type = name.split('.', 1)[0]
-    if daemon_type in ['rgw', 'rbd-mirror', 'crash']:
+    if daemon_type in ['rgw', 'rbd-mirror', 'nfs', 'crash']:
         return 'client.' + name
     elif daemon_type in ['mon', 'osd', 'mds', 'mgr', 'client']:
         return name
index 1ba0d8a57940e40c2cc98b79d8037fb5160aa5a2..20a25ba143f39f797e6dc376a08d444fa83e5ee8 100644 (file)
@@ -45,7 +45,7 @@ class NFSGanesha(object):
 
     def create_keyring(self):
         # type: () -> str
-        entity = 'client.' + self.get_rados_user() 
+        entity = cephadm.name_to_config_section(self.get_rados_user())
 
         osd_caps='allow rw pool=%s' % (self.pool)
         if self.namespace: