Sage Weil
6fb9f0a391
qa/tasks/cephfs/test_nfs: test new export via apply
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
87c98df2cd
doc/cephfs/fs-nfs-export: be consistent with cluster_id and _ vs -
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
729f2f6adf
mgr/nfs: addr -> client_addr for 'nfs export create ...'
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
a2679b3884
mgr/nfs: fix tests
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
2400937ce2
mgr/nfs: 'nfs export get' -> 'nfs export info'
...
This is a breaking change, but aligns the CLI verbs with the rest of ceph.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
5a2382a5a8
mgr/nfs: binding -> pseudo_path
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
b276adbd47
mgr/nfs: more revisions based on review
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
9cf2ae5e8d
mgr/nfs: adjust NFSExceptoin errno arg
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
f0798cf068
doc/cephfs: update 'nfs export {get,apply}' docs
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
1529f78ecf
mgr/nfs: merge FSExport back into ExportMgr
...
This class captures no data, and the current methods cover both cephfs
and rgw exports. There is little value to making the class separate from
ExportMgr.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
0907658f21
doc/radosgw/nfs: document mgr/nfs way to add/remove rgw exports
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
2cb2abb385
mgr/nfs: merge 'nfs export {update,import}' -> 'nfs export apply'
...
The only thing we lose is a strict 'update' that errors out if the
export didn't already exist, and we don't have any known need for that.
Fixes: https://tracker.ceph.com/issues/51265
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
69681f04ba
mgr/nfs: test export creation and list
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
cfee205826
mgr/nfs: test export_update (+ fixes)
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
01a8d0ba3d
mgr/nfs: test Export.validate(); several fixes
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
16c5cb62f7
mgr/nfs: test that export <-> block+dict conversions go both ways
...
Fixes: https://tracker.ceph.com/issues/50449
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
59587fd0b4
mgr/nfs: clean up test a bit
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
fdd47c476e
mgr/nfs/export: fix export validation
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
473097a36f
mgr/nfs/export: fix tests
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
d6d9e59ef7
mgr/nfs: handle option addr/client block in create_export()
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
aaa57afd29
mgr/nfs: allow multiple addrs for new exports
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
119555b84d
mgr/nfs: fix/finish rgw export
...
- create the rgw keys for the export
- cleanup the rgw user on export deletion
Fixes: https://tracker.ceph.com/issues/47172
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
b549981063
mgr/nfs/module: clusterid -> cluster_id
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
6771de2204
mgr/nfs/export: fix export_update_1 to type check
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-21 14:13:15 -04:00
Sage Weil
f9d291b575
mgr/nfs/cluster: fix type error
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:19:50 -04:00
Sage Weil
1cb98a0497
mgr/nfs/export: wrap long lines
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:19:50 -04:00
Sebastian Wagner
8ba3b5bf2e
mgr/nfs: ExportMgr._delete_export only works for cephfs for now
...
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:19:50 -04:00
Sebastian Wagner
e6db0c8101
mgr/nfs: Remove pool_ns from NFSCluster
...
Cause this is a singleton instance. Better to explictly pass it along.
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:19:50 -04:00
Sebastian Wagner
e0a9d9dccf
mgr/nfs: Remove ExportMgr.rados_namespace
...
Cause this is a singleton instance. Better to explictly pass it along.
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:19:50 -04:00
Sebastian Wagner
a24e912099
mgr/nfs: flake8
...
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:19:50 -04:00
Sebastian Wagner
42d01c5ed3
mgr/nfs: Add type checking
...
Also introduce RawBlock class
Fixes: https://tracker.ceph.com/issues/50816
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:19:48 -04:00
Sebastian Wagner
b3ddff8384
mgr/nfs: Add __eq__ method to Export
...
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:18:06 -04:00
Sebastian Wagner
42a8d383e6
mgr/nfs: Add some compatibility to mgr/dashboard
...
provide default values for `squash` and `security_label`
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:18:06 -04:00
Sebastian Wagner
e1928d5706
mgr/nfs: Fix whitespace handling
...
keep whitespace in lines starting with %url
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:18:06 -04:00
Sebastian Wagner
a30328c496
mgr/nfs: Copy unit tests from mgr/dashboard
...
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-17 16:18:06 -04:00
Sage Weil
377756c9df
mgr/nfs: partially implement rgw export support
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
5c33431ce1
mgr/nfs: abstract FSAL; add RGWFSAL
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
097e4f9aa3
mgr/nfs: refactor to merge 'update' and 'import' code
...
- update must be an existing export
- import can be a new or existing export, and we will either update or
create as appropriate.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
778674a9c7
mgr/nfs: add 'nfs export import' command
...
Allow import of JSON to create a new export. Similar to 'update', which
allows an import of JSON to update an existing export.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
2b93356fac
mgr/nfs: refactor 'nfs export update' and export validation
...
Move validation to the Export class, so it can check any object in
place.
Refactor update code to extract allowed changes checks from the old
validation class.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
0eea3d7726
mgr/nfs: fix _fetch_export to distinguish between clusters
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
e4b3673262
mgr/nfs: move export ganesha conf translation into caller
...
This belongs in the (one) caller, not the helper.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
9b1372dc38
mgr/nfs: name nfs cephfs client key 'nfs.{cluster_id}.{export_id}'
...
Better than '{cluster_id}{export_id}', which is confusing and ambiguous.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
137090dac0
mgr/nfs: add --addr to 'nfs export create'
...
Ganesha exports can have multiple client blocks with addresses and
access modes/squash behavior. This cannot easily be exposed via a CLI.
However, providing no client address restriction is pretty useful to users
since it allows full access to the mount point with no restrictions.
Add an --addr argument that creates a single client block. Set the top
export-level access_type to 'none' and squash to 'none' in this case.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
2450447b45
mgr/nfs: add --squash to 'nfs export create'
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
fe1155f015
mgr/nfs/export_utils: include false but non-None items in config
...
For example, attr_expiration_time = 0 is the default. Include this since
it is not None.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
9b9c5bc7a4
vstart.sh: enable nfs module
...
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:06 -04:00
Sage Weil
283a8c184e
mgr/cephadm: nfs: drop attr_expiration_time from top-level config
...
This is added on a per-export basis with the same default of 0.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:05 -04:00
Sage Weil
9d114e910e
mgr/cephadm: remove Dir_Chunk = 0
...
This breaks RGW exports, and is likely to be beneficial for libcephfs.
Signed-off-by: Sage Weil <sage@newdream.net>
2021-06-17 16:18:05 -04:00
J. Eric Ivancich
dfd9f85d5f
Merge pull request #41905 from ivancich/wip-improve-cls-rgw-tracing
...
rgw: clean-up logging of function entering to make thorough and consistent
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Ali Maredia <amaredia@redhat.com>
2021-06-17 15:37:30 -04:00