Commit Graph

494 Commits

Author SHA1 Message Date
Patrick Donnelly
4052b11f18
Merge PR #36998 into master
* refs/pull/36998/head:
	doc/mgr/volumes: Document authorize/deauthorize cli commands
	qa/tasks/cephfs: test `fs subvolume authorize/deauthorize`
	mgr/volumes: Allow/deny auth IDs access to FS subvolumes
	mon/MonCap: allow 'profile mgr' to create/update/del auth IDs

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-11-06 20:51:54 -08:00
Kefu Chai
c5f8bb268e
Merge pull request #37832 from tchaikov/wip-doc-slow-ops
doc: reformat health-messages.rst and revise SLOW_OPS section

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Zac Dover <zac.dover@gmail.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-11-05 21:05:17 +08:00
Kotresh HR
1426c23ab5 doc/mgr/volumes: Document authorize/deauthorize cli commands
Fixes: https://tracker.ceph.com/issues/40401
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2020-11-05 15:29:53 +05:30
Kefu Chai
1a0c45148b doc/cephfs: reformat the health checks
otherwise the "Message" and "Code" of each check are cluttered in the
same paragraph.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-11-03 13:02:27 +08:00
Patrick Donnelly
cb9b2e5815
doc: document MDS cache configuration
Fixes: https://tracker.ceph.com/issues/48010
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-10-28 13:26:14 -07:00
Patrick Donnelly
e32cdd28b1
Merge PR #37717 into master
* refs/pull/37717/head:
	doc/cephfs: add sample cephfs-shell.conf

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-10-21 13:33:21 -07:00
Rishabh Dave
6f95ebf04a doc/cephfs: add sample cephfs-shell.conf
And elaborate the description about it.

Fixes: https://tracker.ceph.com/issues/43028
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-10-21 10:10:38 +05:30
Patrick Donnelly
bd7a847734
Merge PR #37585 into master
* refs/pull/37585/head:
	doc/cephfs/nfs: Remove outdated doc related to rook

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-10-13 10:26:02 -07:00
Varsha Rao
d18117ebfa doc/cephfs/nfs: Remove outdated doc related to rook
The doc is outdated because the mentioned orch commands have changed[1] and
using dashboard backend script to create exports is buggy[2].

[1] https://docs.ceph.com/en/latest/mgr/orchestrator/#current-implementation-status
[2] https://github.com/rook/rook/issues/6147

Fixes: https://tracker.ceph.com/issues/47784
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-10-09 16:20:46 +05:30
Patrick Donnelly
2cb09bd4bd
Merge PR #36554 into master
* refs/pull/36554/head:
	mgr/volumes: Make number of cloner threads configurable

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Shyamsundar R <srangana@redhat.com>
2020-10-08 13:25:15 -07:00
Patrick Donnelly
5c9f77cb65
Merge PR #36457 into master
* refs/pull/36457/head:
	qa/tasks/cephfs: fix fs authorize cmd args
	mds: add root_squash mode in MDS auth caps
	vstart_runner: add write_file and sudo_write_file

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-10-08 13:23:34 -07:00
Ramana Raja
e1c5220780 mds: add root_squash mode in MDS auth caps
Implement a root_squash mode in MDS auth caps to deny operations for
clients with uid=0 or gid=0 that need write access. It's mainly to
prevent operations such as accidental `sudo rm -rf /path`.

The root squash mode can be enforced in one of the following ways in
the MDS caps,
  'allow rw root_squash'
  (across file systems)
          or
  'allow rw fsname=a root_squash'
  (on a file system)
          or
  'allow rw fsname=a path=/vol/group/subvol00 root_squash'
  (on a file system path)

Fixes: https://tracker.ceph.com/issues/42451
Signed-off-by: Ramana Raja <rraja@redhat.com>
2020-09-25 14:34:35 +05:30
Ponnuvel Palaniyappan
d99d520493 doc: Fixed a number of typos in documentation
Signed-off-by: Ponnuvel Palaniyappan <pponnuvel@gmail.com>
2020-09-18 18:17:15 +01:00
Patrick Donnelly
9fcc49fae7
Merge PR #36125 into master
* refs/pull/36125/head:
	doc: cephfs/fs-nfs-exports: more cleanups
	doc: cephfs/fs-nfs-exports: command requires enabled orch module
	doc: cephfs/fs-nfs-exports.rst: write "RADOS" in ALL-CAPS
	doc: cephfs/fs-nfs-exports: use "NFS Ganesha" everywhere
	doc: cephfs: clarify that pseudo root path must be absolute
	doc: cephfs: fix misleading "ceph fs volume create" command
	doc: cephfs: fix misleading "ceph nfs create" command

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zac Dover <zac.dover@gmail.com>
2020-09-14 13:49:50 -07:00
Kotresh HR
83c4442c76 mgr/volumes: Make number of cloner threads configurable
The number of cloner threads is set to 4 and it can't be
configured. This patch makes the number of cloner threads
configurable via the mgr config option "max_concurrent_clones".

On an increase in number of cloner threads, it will just
spawn the difference of threads between existing number of
cloner threads and the new configuration. It will not cancel
the running cloner threads.

On decrease in number of cloner threads, the cases are as follows.

1. If all cloner threads are waiting for the job:
      In this case, all threads are notified and required number
   threads are terminated.

2. If all the cloner threads are processing a job:
      In this case, the condition is validated for each thread after
   the current job is finished and the thread is termianted if the
   condition for required number of cloner threads is not satisified.

3. If few cloner threads are processing and others are waiting:
      The threads which are waiting are notified to validate the
   number of threads required. If terminating those doesn't satisfy the
   required number of threads, the remaining threads are terminated
   upon completion of existing job.

Fixes: https://tracker.ceph.com/issues/46892
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2020-09-11 14:36:37 +05:30
Rishabh Dave
8301c44c70 doc/cephfs: add minor fixes for client-auth doc
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Douglas Fuller
91d5715be6 cephfs: add auth caps based on fs names
Add new auth caps to restrict access to clients based on fsnames. To
specify this, for example:

mds 'allow rw fsname=cephfs1'

This will restrict client access to fs name "cephfs1" only. Messages to
active MDS assigned to any other FSMap will be dropped. Standby MDS not
associated with an FSMap will accept messages from clients. To allow
multiple file systems, create MDS cap as follows -

mds 'allow rw fsname=cephfs1, allow rw fsname=cephfs2'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Douglas Fuller
811e48d6ff mon/MDSMonitor: add mon auth caps for CephFS names
Add a 'fsname' clause to mon auth caps to restrict a client's view
of the FSMap. Example:

mon 'allow rw fsname=cephfs2'

This would restrict the client's view of the FSMap to the MDSMap for
cephfs2. Any MDS allocated to a different filesystem will be invisible.
Global standby daemons are always visible. To allow multiple CephFSs,
add multiple caps:

mon 'allow rw fsname=cephfs2, allow rw fsname=cephfs2'

Fixes: http://tracker.ceph.com/issues/15070
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-09-10 17:10:51 +05:30
Nathan Cutler
ab447c888b doc: cephfs/fs-nfs-exports: more cleanups
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 13:37:23 +02:00
Nathan Cutler
42a1194872 doc: cephfs/fs-nfs-exports: command requires enabled orch module
Clarify that the "ceph nfs cluster create" command requires an
enabled ceph-mgr orchestrator module.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 10:23:08 +02:00
Nathan Cutler
0dc9820f51 doc: cephfs/fs-nfs-exports.rst: write "RADOS" in ALL-CAPS
Since RADOS is an acronym, albeit a somewhat difficult-to-remember one,
it is customary to write it ALL-CAPS.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 08:46:59 +02:00
Nathan Cutler
bc8b2c3823 doc: cephfs/fs-nfs-exports: use "NFS Ganesha" everywhere
The document seemed to be wanting to refer to the software as "NFS
Ganesha", but was failing to do so in some places.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 08:46:56 +02:00
Nathan Cutler
ccc13cbff4 doc: cephfs: clarify that pseudo root path must be absolute
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 08:34:29 +02:00
Nathan Cutler
6f0c2496d6 doc: cephfs: fix misleading "ceph fs volume create" command
The "ceph fs volume create" command takes a placement string,
just like "ceph nfs cluster create" does. Align the documentation
so the placement string is explained in the same manner in both
places.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 08:34:29 +02:00
Nathan Cutler
865001247b doc: cephfs: fix misleading "ceph nfs create" command
When a reader sees "ceph nfs create <type=cephfs>" it's not
clear that this means they should type "ceph nfs create cephfs".

I also took this opportunity to clarify the command description
based on my testing and discussions with the CephFS developers.

Fixes: https://tracker.ceph.com/issues/46559
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-08 08:34:29 +02:00
Patrick Donnelly
d2a3fcc728
Merge PR #36773 into master
* refs/pull/36773/head:
	mgr/volumes: Prevent subvolume recreate if trash is not-empty
	mgr/volumes: Disallow subvolume group level snapshots
	mgr/volumes: Add test case to ensure subvolume is marked
	mgr/volumes: handle idempotent subvolume marks
	mgr/volumes: Tests amended and added to ensure subvolume trash functionality
	mgr/volumes: Mark subvolume root with the vxattr ceph.dir.subvolume
	mgr/volumes: Move incarnations for v2 subvolumes, to subvolume trash
	mgr/volumes: maintain per subvolume trash directory
	mgr/volumes: make subvolume_v2::_is_retained() object property

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-08-26 10:46:07 -07:00
Shyamsundar Ranganathan
f97e57c28c mgr/volumes: Disallow subvolume group level snapshots
Fixes: https://tracker.ceph.com/issues/47154
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
2020-08-26 13:41:26 -04:00
Sage Weil
dfd01d7653 blacklist -> blocklist
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-08-24 19:53:08 +00:00
Varsha Rao
287da11921 doc/cephfs/nfs: Update the doc about 'reset' and 'set' config interfaces
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-08-10 10:19:57 +00:00
Patrick Donnelly
cd8457cbfd
Merge PR #35647 into master
* refs/pull/35647/head:
	mgr/volumes: Add documentation regarding --retain-snapshots option
	mgr/volumes: Avoid trashing retained subvolume on create errors
	mgr/volumes: Add subvolume v2 test cases
	mgr/volumes: Derive v2 from v1 to leverage common methods
	mgr/volumes: Introduce v2 subvolumes
	mgr/volumes: Use operation type during subvolume open

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
2020-07-31 14:11:27 -07:00
Shyamsundar Ranganathan
61e118ff6d mgr/volumes: Add documentation regarding --retain-snapshots option
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
2020-07-29 21:14:40 -04:00
Varsha Rao
bd702707b5 doc/cephfs: Update about cephfs-shell custom exit codes
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-07-24 17:53:57 +05:30
Varsha Rao
7f911a710d doc/cephfs/nfs: Update about deploying nfs-ganesha with cephadm in vstart
Fixes: https://tracker.ceph.com/issues/46571
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-07-16 17:06:11 +05:30
Patrick Donnelly
7f8bd09e88
Merge PR #35755 into master
* refs/pull/35755/head:
	mgr/volumes: Deprecate protect/unprotect CLI calls for subvolume snapshots

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Victoria Martinez de la Cruz <vkmc@redhat.com>
Reviewed-by: Goutham Pacha Ravi <gouthamr@redhat.com>
2020-07-13 19:58:13 -07:00
Shyamsundar Ranganathan
c52a7383d3 mgr/volumes: Deprecate protect/unprotect CLI calls for subvolume snapshots
Subvolume snapshots required to be protected, prior to cloning the same.

Also, protected snapshots were not allowed to be unprotected or removed,
if there were in-flight clones, whose source was the snapshot being
removed.

The protection of snapshots explicitly is not required, as these can be
prevented from being removed based only on the in-flight clones checks.

This commit hence deprecates the additional protect/unprotect requirements
prior to cloning a snapshot.

In addition to deprecating the above, support to query a subvolume for
supported features, via the info command, is added. The feature list
is set to "clone" and "auto-protect", where the latter is useful to
decide if protect/unprotect commands are required or not.

Fixes: https://tracker.ceph.com/issues/45371

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
2020-07-10 11:08:44 -04:00
Varsha Rao
16900045f4 doc: Update nfs-ganesha package requirements
Fixes: https://tracker.ceph.com/issues/46449
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-07-10 16:55:41 +05:30
Patrick Donnelly
cbfdc98651
Merge PR #35415 into master
* refs/pull/35415/head:
	mds: make threshold for MDS_TRIM configurable

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-07-08 18:58:30 -07:00
Patrick Donnelly
4ec68680bd
Merge PR #33827 into master
* refs/pull/33827/head:
	mon: add 'ceph fs required_client_feature <fs_name> add/rm' command

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-07-08 17:06:16 -07:00
Varsha Rao
1faed4b1aa mgr/volumes/nfs: Add cluster show info command
Fixes: https://tracker.ceph.com/issues/45743
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-07-07 10:50:22 +05:30
Yan, Zheng
c4a335d7c6 mon: add 'ceph fs required_client_feature <fs_name> add/rm' command
Fixes: https://tracker.ceph.com/issues/43817
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2020-07-07 09:05:56 +08:00
Varsha Rao
55fd634e88 doc/cephfs: Add list and get export usage
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Varsha Rao
b77c3eef78 mgr/volumes/nfs: Add nfs cluster ls command
This commands provides list of deployed nfs clusters.

Fixes: https://tracker.ceph.com/issues/45742
Signed-off-by: Varsha Rao <varao@redhat.com>
2020-06-30 23:17:38 +05:30
Paul Emmerich
d905678a87 mds: make threshold for MDS_TRIM configurable
Fixes: https://tracker.ceph.com/issues/45906
Signed-off-by: Paul Emmerich <paul.emmerich@croit.io>
2020-06-30 18:26:37 +02:00
Patrick Donnelly
0603aa681a
doc: update cephfs metadata pool recovery procedure
This is mostly clarifying a few things after personally experimenting
with this.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-25 09:40:27 -07:00
Patrick Donnelly
6cd10c591a
doc: add documentation for new ephemeral pinning feature
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-24 15:43:32 -07:00
Patrick Donnelly
0e74b92258
Merge PR #32288 into master
* refs/pull/32288/head:
	test_cephfs_shell: remove test_every_shell_cmd_at_invocation
	test_cephfs_shell: catch specific exception instead of catching all
	cephfs-shell: set return value before exiting
	test_cephfs_shell: re-arrange TestCephFSShell's methods
	cephfs-shell: re-arrange code under __main__
	test_cephfs_shell: add new test for shell cmd at invocation
	cephfs-shell: launch shell only if there are no args following

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Varsha Rao <varao@redhat.com>
2020-06-16 19:28:48 -07:00
Patrick Donnelly
4b54ab690b
Merge PR #34716 into master
* refs/pull/34716/head:
	mgr/volumes: Add snapshot info command

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
2020-06-12 14:10:14 -07:00
Rishabh Dave
9b2077ff10 cephfs-shell: set return value before exiting
Code for each command has a return value set yet cephfs-shell itself
doesn't exit with proper return value. This makes cephfs-shell quit with
zero return value all the time.

Also, many tests execute cephfs-shell commands expecting the command to
fail but without expecting the method issuing the command to fail. Fix
these test accordingly by adding a new method (negtest_cephfs_shell_cmd)
that expects the command to fail and allows verifying return value and
error messages.

Fixes: https://tracker.ceph.com/issues/44113
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:41:16 +05:30
Rishabh Dave
2d5201fdba cephfs-shell: launch shell only if there are no args following
Commands like "cephfs-shell mkdir a" should just create the directory
and quit immediately with the command's return value instead of
launching a shell session. A shell session should be launched only if
there are no arguments following "cephfs-shell".

Fixes: https://tracker.ceph.com/issues/43248
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2020-06-05 09:26:47 +05:30
Patrick Donnelly
cc36113ad4
Merge PR #34776 into master
* refs/pull/34776/head:
	mgr/volumes: Create subvolume with isolated rados namespace

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-06-02 17:44:21 -07:00