From: Michael Fritch Date: Tue, 31 Mar 2020 23:39:03 +0000 (-0600) Subject: cephadm: add `extra_args` to nfs daemon X-Git-Tag: v16.1.0~2712^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34330%2Fhead;p=ceph.git cephadm: add `extra_args` to nfs daemon Signed-off-by: Michael Fritch --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 94bf18f62c51..065c84caf59a 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -190,6 +190,7 @@ class NFSGanesha(object): # config-json options self.pool = json_get('pool', require=True) self.namespace = json_get('namespace') + self.extra_args = json_get('extra_args', []) self.files = json_get('files', {}) # validate the supplied args @@ -264,6 +265,10 @@ class NFSGanesha(object): cname = '%s-%s' % (cname, desc) return cname + def get_daemon_args(self): + # type: () -> List[str] + return self.daemon_args + self.extra_args + def get_file_content(self, fname): # type: (str) -> str """Normalize the json file content into a string""" @@ -1276,7 +1281,8 @@ def get_daemon_args(fsid, daemon_type, daemon_id): for peer in peers: r += ["--cluster.peer={}".format(peer)] elif daemon_type == NFSGanesha.daemon_type: - r += NFSGanesha.daemon_args + nfs_ganesha = NFSGanesha.init(fsid, daemon_id) + r += nfs_ganesha.get_daemon_args() return r diff --git a/src/pybind/mgr/cephadm/nfs.py b/src/pybind/mgr/cephadm/nfs.py index ff748fa57463..0f8acc0362c6 100644 --- a/src/pybind/mgr/cephadm/nfs.py +++ b/src/pybind/mgr/cephadm/nfs.py @@ -121,6 +121,7 @@ RADOS_URLS {{ config = {'pool' : self.spec.pool} # type: Dict if self.spec.namespace: config['namespace'] = self.spec.namespace + config['extra_args'] = ['-N', 'NIV_EVENT'] config['files'] = { 'ganesha.conf' : self.get_ganesha_conf(), }