cephadm: add userid during grace add/remove

ganesha-rados-grace needs a rados userid to add/remove from the grace db

Mar 27 10:05:25 host1 bash[11684]: rados_connect: -13
Mar 27 10:05:25 host1 bash[11684]: Can't connect to cluster: -13

Signed-off-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
Michael Fritch 2020-04-02 10:31:39 -06:00
parent eadfffe596
commit ea5b0430f3
No known key found for this signature in database
GPG Key ID: 75F3EB2E80A03B7F
2 changed files with 4 additions and 0 deletions

View File

@ -190,6 +190,7 @@ class NFSGanesha(object):
# config-json options
self.pool = json_get('pool', require=True)
self.namespace = json_get('namespace')
self.userid = json_get('userid')
self.extra_args = json_get('extra_args', [])
self.files = json_get('files', {})
@ -308,6 +309,8 @@ class NFSGanesha(object):
args=['--pool', self.pool]
if self.namespace:
args += ['--ns', self.namespace]
if self.userid:
args += ['--userid', self.userid]
args += [action, self.get_daemon_name()]
data_dir = get_data_dir(self.fsid, self.daemon_type, self.daemon_id)

View File

@ -109,6 +109,7 @@ RADOS_URLS {{
config = {'pool' : self.spec.pool} # type: Dict
if self.spec.namespace:
config['namespace'] = self.spec.namespace
config['userid'] = self.get_rados_user()
config['extra_args'] = ['-N', 'NIV_EVENT']
config['files'] = {
'ganesha.conf' : self.get_ganesha_conf(),