]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: Make cluster id option mandatory in nfs create export
authorVarsha Rao <varao@redhat.com>
Mon, 6 Apr 2020 14:24:37 +0000 (19:54 +0530)
committerVarsha Rao <varao@redhat.com>
Wed, 8 Apr 2020 11:51:17 +0000 (17:21 +0530)
Signed-off-by: Varsha Rao <varao@redhat.com>
doc/cephfs/fs-nfs-exports.rst
src/pybind/mgr/volumes/module.py
src/vstart.sh

index aa9f69de0f90405d670c4ec248713622a7db8e19..f18bbbae170c30e1b651e5f47ebf62616742c130 100644 (file)
@@ -35,7 +35,7 @@ Create CephFS Export
 
 .. code:: bash
 
-    $ ceph nfs export create <type=cephfs> <fsname> <binding> [--readonly] [--path=/path/in/cephfs] [--attach=<clusterid>]
+    $ ceph nfs export create <type=cephfs> <fsname> <binding> <clusterid> [--readonly] [--path=/path/in/cephfs]
 
 It creates export rados objects containing the export block. Here binding is
 the pseudo root name and type is export type. Currently only CephFS is
index a5cbe960f7dc97e99798a4586214e6815545616e..a1ab40d1658cd45458a51528b11d03452287c93a 100644 (file)
@@ -220,9 +220,9 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
             'name=type,type=CephString '
             'name=fsname,type=CephString '
             'name=binding,type=CephString '
+            'name=attach,type=CephString '
             'name=readonly,type=CephBool,req=false '
-            'name=path,type=CephString,req=false '
-            'name=attach,type=CephString,req=false ',
+            'name=path,type=CephString,req=false ',
             'desc': "Create a cephfs export",
             'perm': 'rw'
         },
@@ -409,7 +409,7 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         #TODO Extend export creation for rgw.
         return self.fs_export.create_export(export_type=cmd['type'], fs_name=cmd['fsname'],
                 pseudo_path=cmd['binding'], read_only=cmd.get('readonly', False),
-                path=cmd.get('path', '/'), cluster_id=cmd.get('attach','None'))
+                path=cmd.get('path', '/'), cluster_id=cmd.get('attach'))
 
     def _cmd_fs_nfs_export_delete(self, inbuf, cmd):
             return self.fs_export.delete_export(cmd['export_id'])
index 11db9555cd817e2267ee0c52f48af815ea711b5e..47e1f34f8984e943907004ccfcb3002eb925d439 100755 (executable)
@@ -1136,7 +1136,7 @@ start_ganesha() {
         pid file = $ganesha_dir/ganesha.pid
 EOF
 
-        prun ceph_adm nfs export create cephfs "a" "/cephfs" --attach=$name
+        prun ceph_adm nfs export create cephfs "a" "/cephfs" $name
         prun ganesha-rados-grace -p $pool_name -n $namespace add $name
         prun ganesha-rados-grace -p $pool_name -n $namespace