]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerMichael Fritch <mfritch@suse.com>
Thu, 9 Apr 2020 19:28:48 +0000 (13:28 -0600)
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>
src/cephadm/cephadm
src/pybind/mgr/cephadm/nfs.py

index 16965d61bb5a471fb931998714ecfdba92077e70..2c34d6e5f2c6823ed79444ca69cef0ccce86bba7 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(),