From: Varsha Rao Date: Mon, 6 Apr 2020 14:24:37 +0000 (+0530) Subject: mgr/volumes: Make cluster id option mandatory in nfs create export X-Git-Tag: v16.1.0~2626^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=25642bcf50dd56ab5cd14470543f9e3fb7a4185b;p=ceph.git mgr/volumes: Make cluster id option mandatory in nfs create export Signed-off-by: Varsha Rao --- diff --git a/doc/cephfs/fs-nfs-exports.rst b/doc/cephfs/fs-nfs-exports.rst index aa9f69de0f904..f18bbbae170c3 100644 --- a/doc/cephfs/fs-nfs-exports.rst +++ b/doc/cephfs/fs-nfs-exports.rst @@ -35,7 +35,7 @@ Create CephFS Export .. code:: bash - $ ceph nfs export create [--readonly] [--path=/path/in/cephfs] [--attach=] + $ ceph nfs export create [--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 diff --git a/src/pybind/mgr/volumes/module.py b/src/pybind/mgr/volumes/module.py index a5cbe960f7dc9..a1ab40d1658cd 100644 --- a/src/pybind/mgr/volumes/module.py +++ b/src/pybind/mgr/volumes/module.py @@ -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']) diff --git a/src/vstart.sh b/src/vstart.sh index 11db9555cd817..47e1f34f8984e 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -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