Skip to content

Commit

Permalink
mgr/volumes: Make cluster id option mandatory in nfs create export
Browse files Browse the repository at this point in the history
Signed-off-by: Varsha Rao <[email protected]>
  • Loading branch information
varshar16 committed Apr 8, 2020
1 parent a84d4b0 commit 25642bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/cephfs/fs-nfs-exports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/pybind/mgr/volumes/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
},
Expand Down Expand Up @@ -409,7 +409,7 @@ def _cmd_nfs_export_create(self, inbuf, cmd):
#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'])
Expand Down
2 changes: 1 addition & 1 deletion src/vstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 25642bc

Please sign in to comment.