]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: add userid during grace add/remove
authorMichael Fritch <mfritch@suse.com>
Thu, 2 Apr 2020 16:31:39 +0000 (10:31 -0600)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 14 Apr 2020 14:50:50 +0000 (16:50 +0200)
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>
(cherry picked from commit ea5b0430f38393d057166d6e238890a77157fca1)

src/cephadm/cephadm
src/pybind/mgr/cephadm/nfs.py

index a73850117db2bb3a2c50965ab3525b839a863ea3..9d0101e9046eff7743cace232d6891fdb0bb9c92 100755 (executable)
@@ -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)
index adc0fc3c3b183a66706eafb40bf09d10316d3064..547047b6b00ce10ac5a04119711d31749d2debad 100644 (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(),