From 246a80af7a51a768fbc81b36d5963306b5062a6b Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Tue, 31 Mar 2020 17:39:03 -0600 Subject: [PATCH] cephadm: add `extra_args` to nfs daemon Signed-off-by: Michael Fritch --- src/cephadm/cephadm | 8 +++++++- src/pybind/mgr/cephadm/nfs.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 94bf18f62c5..065c84caf59 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 ff748fa5746..0f8acc0362c 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(), } -- 2.39.5