From fd6322f7ec51f3dc57168bbd08ffab3c832a4598 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Fri, 13 Mar 2020 14:19:23 -0600 Subject: [PATCH] mgr/cephadm: ensure nfs uses the correct entity mon entity needs to start with `client.` Signed-off-by: Michael Fritch --- src/pybind/mgr/cephadm/__init__.py | 2 +- src/pybind/mgr/cephadm/module.py | 2 +- src/pybind/mgr/cephadm/nfs.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/cephadm/__init__.py b/src/pybind/mgr/cephadm/__init__.py index f390f18c16aaa..4d7a2fcb659da 100644 --- a/src/pybind/mgr/cephadm/__init__.py +++ b/src/pybind/mgr/cephadm/__init__.py @@ -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 diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 333cd53a79dc1..1f1fd4527d4b6 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -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 diff --git a/src/pybind/mgr/cephadm/nfs.py b/src/pybind/mgr/cephadm/nfs.py index 1ba0d8a57940e..20a25ba143f39 100644 --- a/src/pybind/mgr/cephadm/nfs.py +++ b/src/pybind/mgr/cephadm/nfs.py @@ -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: -- 2.39.5