]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agomgr/nfs: test export apply on JSON list
Sage Weil [Fri, 9 Jul 2021 15:19:55 +0000 (11:19 -0400)]
mgr/nfs: test export apply on JSON list

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit bfd5ab3124ec73a7b4d28feba3d50780b1a0e8ca)

3 years agomgr/nfs: add test for ganesha conf apply/import
Sage Weil [Fri, 9 Jul 2021 13:54:59 +0000 (09:54 -0400)]
mgr/nfs: add test for ganesha conf apply/import

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 7760cb2aedf52e247d9908b65d30250e2a049df3)

3 years agoqa/tasks/cephfs/test_nfs: retry mount a few times
Sage Weil [Wed, 7 Jul 2021 17:50:39 +0000 (13:50 -0400)]
qa/tasks/cephfs/test_nfs: retry mount a few times

It may take a moment for a ganesha to (re)configure itself with a new
export.  If a mount fails, retry a couple times.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 1e6fd912f646c77d22bf38f28d50d31f9679fe4c)

3 years agomgr/cephadm: migrate all legacy nfs exports to new .nfs pool
Sage Weil [Fri, 2 Jul 2021 19:53:15 +0000 (15:53 -0400)]
mgr/cephadm: migrate all legacy nfs exports to new .nfs pool

Migrate all past NFS pools, whether they were created by mgr/nfs or by
the dashboard, to the new mgr/nfs .nfs pool.

Since this migrations relies on RADOS being available, we have to be a bit
careful here: we only attempt the migration from serve(), not during
module init.

After the exports are re-imported, we destroy existing ganesha daemons so
that new ones will get recreated.  This ensures the (new) daemons have
cephx keys to access the new pool.

Note that no attempt is made to clean up the old NFS pools.  This is out
of paranoia: if something goes wrong, the old NFS configuration data will
still be there.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit c183bccdc6728e8321eec615b1acd88216acabca)

3 years agomgr/nfs: adjust cephfs export caps if necessary
Sage Weil [Fri, 2 Jul 2021 19:53:02 +0000 (15:53 -0400)]
mgr/nfs: adjust cephfs export caps if necessary

If we are importing an old export, we may find that the cephx user
existed but with the wrong caps.  Adjust caps in that case!

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 379a1fc4d794405edd4c34d9ac44c2c5621cfe58)

3 years agopython-common: don't accept pool/ns for NFSServiceSpec
Sage Weil [Fri, 2 Jul 2021 18:43:56 +0000 (14:43 -0400)]
python-common: don't accept pool/ns for NFSServiceSpec

All users are now gone.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d0d95db00d462cc8101311d591bda26dc452581f)

3 years agomgr/orchestrator: drop rados_config_location ServiceDescription property
Sage Weil [Fri, 2 Jul 2021 18:43:12 +0000 (14:43 -0400)]
mgr/orchestrator: drop rados_config_location ServiceDescription property

I'm not sure what this was intended to be used for...

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 75970ff80652e10bd79234b97de63cb0f39d9d90)

3 years agomgr/cephadm: move rados_config_location() out of NFSServiceSpec
Sage Weil [Fri, 2 Jul 2021 18:42:34 +0000 (14:42 -0400)]
mgr/cephadm: move rados_config_location() out of NFSServiceSpec

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 7cbd1fbce82c567a2f8608b051dd16bbb8c5ae07)

3 years agomgr/nfs: change nfs pool to .nfs
Sage Weil [Fri, 2 Jul 2021 16:39:29 +0000 (12:39 -0400)]
mgr/nfs: change nfs pool to .nfs

This is a new pool that we can migrate all past NFS configuration to,
simplifying the migration process (and also allowing us to pick a
.-prefixed name).

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 82e939d89c3b6e2ce6faad9a5315c5372fef341d)

Conflicts:
src/pybind/mgr/rook/rook_cluster.py

3 years agomgr/nfs/export: accept a JSON or ganesha EXPORT config
Sage Weil [Wed, 30 Jun 2021 22:25:02 +0000 (18:25 -0400)]
mgr/nfs/export: accept a JSON or ganesha EXPORT config

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 6b2ccb2049484d2325bd2189410165093217a766)

3 years agomgr/nfs: allow 'nfs export apply' to take a list of exports
Sage Weil [Mon, 28 Jun 2021 19:51:05 +0000 (15:51 -0400)]
mgr/nfs: allow 'nfs export apply' to take a list of exports

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 1d5f63ecc5e047eac548f85b819d3ea3f5b2215c)

3 years agopython-common: remove pool + namespace from NFSServiceSpec
Sage Weil [Mon, 28 Jun 2021 18:45:13 +0000 (14:45 -0400)]
python-common: remove pool + namespace from NFSServiceSpec

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9d38ee24cf6a2dd79d1fbce50ff4f83dac79f436)

3 years agomgr/nfs: used fixed pool + ns
Sage Weil [Mon, 28 Jun 2021 18:44:50 +0000 (14:44 -0400)]
mgr/nfs: used fixed pool + ns

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 3ee6775c3ca96b9f408d4e5977e9d15142b5f1e5)

3 years agomgr/rook: used fixed pool + ns
Sage Weil [Mon, 28 Jun 2021 18:44:27 +0000 (14:44 -0400)]
mgr/rook: used fixed pool + ns

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d799f9b5bdf39b2c3226cd160ac5f470951eea67)

Conflicts:
src/pybind/mgr/rook/rook_cluster.py

3 years agomgr/dashboard: use fixed pool + ns
Sage Weil [Mon, 28 Jun 2021 18:43:21 +0000 (14:43 -0400)]
mgr/dashboard: use fixed pool + ns

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit ea7c8910ea8ed383749e0c15f95d6f61796b98ff)

3 years agomgr/cephadm: always use fixed pool and namespace
Sage Weil [Mon, 28 Jun 2021 17:55:15 +0000 (13:55 -0400)]
mgr/cephadm: always use fixed pool and namespace

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 568c630760a35c953e945fe56d9524fee66b803e)

3 years agomgr/nfs: adjust test to match pool name
Sage Weil [Mon, 28 Jun 2021 17:54:00 +0000 (13:54 -0400)]
mgr/nfs: adjust test to match pool name

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 362e121e468f7f2b16eb457ba24d9af8b74c3f9c)

3 years agomgr/nfs: always create ganesha pool with well-defined name
Sage Weil [Mon, 28 Jun 2021 17:53:45 +0000 (13:53 -0400)]
mgr/nfs: always create ganesha pool with well-defined name

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 48de07886a6ebbed71b2b85babf56fae6ab0eceb)

3 years agodoc/mgr/nfs: update about RGW exports
Varsha Rao [Mon, 12 Jul 2021 07:31:49 +0000 (13:01 +0530)]
doc/mgr/nfs: update about RGW exports

This patch just moves the RGW exports created using nfs module to mgr/nfs
document. The RGW requirements will be updated in a different PR.

Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 387369373cba9f569b5fd84e64fffb0fe8de6821)

Conflicts:
doc/mgr/nfs.rst

3 years agodoc/cephfs/nfs: update about nfs module
Varsha Rao [Mon, 12 Jul 2021 07:08:36 +0000 (12:38 +0530)]
doc/cephfs/nfs: update about nfs module

Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 65489e8d3e7f40f19e1df5ed6871d7116e4a5023)

Conflicts:
    doc/cephfs/nfs.rst

3 years agodoc/mgr/nfs: update cephfs export create command about client and squash arguments
Varsha Rao [Mon, 12 Jul 2021 06:29:59 +0000 (11:59 +0530)]
doc/mgr/nfs: update cephfs export create command about client and squash arguments

Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 5db2b48f14cddf673323d72f303ed1cfedd877f9)

3 years agodoc/mgr/nfs: update nfs links
Varsha Rao [Tue, 29 Jun 2021 13:39:44 +0000 (19:09 +0530)]
doc/mgr/nfs: update nfs links

Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit ce7fef695b82d798ed38728ccc032990b1ad9dd9)

Conflicts:
.github/labeler.yml
doc/releases/pacific.rst

3 years agodoc/mgr/nfs: add missing cluster_id to export info command
Varsha Rao [Tue, 29 Jun 2021 13:08:03 +0000 (18:38 +0530)]
doc/mgr/nfs: add missing cluster_id to export info command

Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 29f28563ec94d06eaebf1a014645f259e93f8246)

3 years agodoc/cephfs: move nfs doc under mgr docs
Varsha Rao [Tue, 29 Jun 2021 13:03:36 +0000 (18:33 +0530)]
doc/cephfs: move nfs doc under mgr docs

Fixes: https://tracker.ceph.com/issues/51428
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit c79b797465bda1a30a085ea25bc1b3f82e5665de)

3 years agoqa/tasks/vstart_runner: add LocalCluster.run
Sage Weil [Fri, 25 Jun 2021 23:16:19 +0000 (19:16 -0400)]
qa/tasks/vstart_runner: add LocalCluster.run

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 1bfa812f5d976e5c9558a0d52ca160566f38c9d3)

3 years agoqa/tasks/cephfs/test_nfs: fiddle with sudo
Sage Weil [Fri, 25 Jun 2021 19:08:03 +0000 (15:08 -0400)]
qa/tasks/cephfs/test_nfs: fiddle with sudo

- no sudo for 'ceph' commands
- explicit sudo for _sys_cmd (things like 'rados' don't need sudo!)

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 8788af5663c52f54bede3076b52b8fda11b4c908)

3 years agomgr/nfs/export: some cleanup, minor refactoring
Sage Weil [Wed, 23 Jun 2021 16:42:17 +0000 (12:42 -0400)]
mgr/nfs/export: some cleanup, minor refactoring

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d1c20f800397f15878147bff4a642e695b25a345)

3 years agomgr/nfs/cluster: remove unused @cluster_setter
Sage Weil [Thu, 24 Jun 2021 20:05:14 +0000 (16:05 -0400)]
mgr/nfs/cluster: remove unused @cluster_setter

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 51bb1703f1f44fc1182cc15154f7f5d8476ee805)

3 years agonfs/mgr: fix help message case
Sage Weil [Thu, 24 Jun 2021 16:41:18 +0000 (12:41 -0400)]
nfs/mgr: fix help message case

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 14cf8c7174d15c164c609a3d4a91e06f2a6a3ce9)

3 years agodoc/cephfs/fs-nfs-export: add note about export update behavior
Sage Weil [Wed, 23 Jun 2021 16:46:07 +0000 (12:46 -0400)]
doc/cephfs/fs-nfs-export: add note about export update behavior

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit fc304f2d56c739633ae4a4f118d48c85a3affee0)

3 years agomgr/nfs: move user create/delete into helper
Sage Weil [Tue, 22 Jun 2021 16:25:44 +0000 (12:25 -0400)]
mgr/nfs: move user create/delete into helper

- Do user create or delete via a helper
- Defer until after we have validated the Export (on create or update)
- Support updates to user_id, which is needed to keep the naming consistent
and to also support changing the bucket, since the user_id is derived
from that.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 10786a63806d91d655b3914af7b98d059ae05464)

3 years agomgr/nfs: refactor _delete_user helper
Sage Weil [Mon, 21 Jun 2021 16:26:47 +0000 (12:26 -0400)]
mgr/nfs: refactor _delete_user helper

Single caller, trivial functions, and caller is also short.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 165e02561c439f459a6b0e515e5e3fbe65bfcacc)

3 years agomgr/nfs: refactor create_export_from_dict() helper
Sage Weil [Tue, 22 Jun 2021 16:26:48 +0000 (12:26 -0400)]
mgr/nfs: refactor create_export_from_dict() helper

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 636c1575474f593e96bf2c149e8ac531f1ca70da)

3 years agomgr/nfs: keep 'nfs export get' around for backward-compat
Sage Weil [Mon, 21 Jun 2021 16:35:36 +0000 (12:35 -0400)]
mgr/nfs: keep 'nfs export get' around for backward-compat

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f307c0dccdc999aa9cbef0e510e4c0ff9dc1147e)

3 years agomgr/nfs: rename method
Sage Weil [Mon, 21 Jun 2021 16:23:58 +0000 (12:23 -0400)]
mgr/nfs: rename method

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 317143d8bfd4a0721bdd32006f13a1aecca7b109)

3 years agoqa/tasks/cephfs/test_nfs: test new export via apply
Sage Weil [Mon, 21 Jun 2021 16:17:48 +0000 (12:17 -0400)]
qa/tasks/cephfs/test_nfs: test new export via apply

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 6fb9f0a391138440aab605434608a399f3c21316)

3 years agodoc/cephfs/fs-nfs-export: be consistent with cluster_id and _ vs -
Sage Weil [Mon, 21 Jun 2021 16:13:40 +0000 (12:13 -0400)]
doc/cephfs/fs-nfs-export: be consistent with cluster_id and _ vs -

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 87c98df2cd2aa27806fe7f4f8cd4e5ec0a4fd74b)

3 years agomgr/nfs: addr -> client_addr for 'nfs export create ...'
Sage Weil [Sun, 20 Jun 2021 14:10:15 +0000 (10:10 -0400)]
mgr/nfs: addr -> client_addr for 'nfs export create ...'

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 729f2f6adf7ea6207d61cf9f3f3ccb90560733fc)

3 years agomgr/nfs: fix tests
Sage Weil [Fri, 18 Jun 2021 01:30:48 +0000 (21:30 -0400)]
mgr/nfs: fix tests

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit a2679b38845eb652f31130c1335f071d2f4f9d89)

3 years agomgr/nfs: 'nfs export get' -> 'nfs export info'
Sage Weil [Fri, 18 Jun 2021 15:01:32 +0000 (11:01 -0400)]
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>
(cherry picked from commit 2400937ce25289f5a8e003244f8a14654735d0c2)

3 years agomgr/nfs: binding -> pseudo_path
Sage Weil [Thu, 17 Jun 2021 21:12:15 +0000 (17:12 -0400)]
mgr/nfs: binding -> pseudo_path

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5a2382a5a85eeba80bdd7f6192d4bc7a4af094e5)

3 years agomgr/nfs: more revisions based on review
Sage Weil [Thu, 17 Jun 2021 17:55:48 +0000 (12:55 -0500)]
mgr/nfs: more revisions based on review

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit b276adbd4780702fc98303f05b78d946cb677182)

3 years agomgr/nfs: adjust NFSExceptoin errno arg
Sage Weil [Thu, 17 Jun 2021 20:17:24 +0000 (16:17 -0400)]
mgr/nfs: adjust NFSExceptoin errno arg

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9cf2ae5e8d84d60d63d67643596eca7b32082cf7)

3 years agodoc/cephfs: update 'nfs export {get,apply}' docs
Sage Weil [Thu, 17 Jun 2021 20:15:03 +0000 (16:15 -0400)]
doc/cephfs: update 'nfs export {get,apply}' docs

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f0798cf0681325bb780d2737db3bf86c199c0aa1)

3 years agomgr/nfs: merge FSExport back into ExportMgr
Sage Weil [Thu, 17 Jun 2021 20:01:50 +0000 (16:01 -0400)]
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>
(cherry picked from commit 1529f78ecf43ddc878ae028e6a56baa87daeed3b)

3 years agodoc/radosgw/nfs: document mgr/nfs way to add/remove rgw exports
Sage Weil [Thu, 17 Jun 2021 19:45:17 +0000 (15:45 -0400)]
doc/radosgw/nfs: document mgr/nfs way to add/remove rgw exports

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 0907658f21b643dd767abdafcbbbf173213a6558)

3 years agomgr/nfs: merge 'nfs export {update,import}' -> 'nfs export apply'
Sage Weil [Tue, 15 Jun 2021 17:34:47 +0000 (12:34 -0500)]
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>
(cherry picked from commit 2cb2abb385f97714cbe59371aa788394799db925)

3 years agomgr/nfs: test export creation and list
Sage Weil [Fri, 11 Jun 2021 23:22:03 +0000 (19:22 -0400)]
mgr/nfs: test export creation and list

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 69681f04ba78ad377219d113593759218e5bf4e4)

3 years agomgr/nfs: test export_update (+ fixes)
Sage Weil [Fri, 11 Jun 2021 20:55:25 +0000 (16:55 -0400)]
mgr/nfs: test export_update (+ fixes)

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit cfee205826d6a3ce1a9cb0fc5a66088f67e49186)

3 years agomgr/nfs: test Export.validate(); several fixes
Sage Weil [Fri, 11 Jun 2021 19:55:27 +0000 (15:55 -0400)]
mgr/nfs: test Export.validate(); several fixes

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 01a8d0ba3d5aaf09b26de3acee33772c43ed9cac)

3 years agomgr/nfs: test that export <-> block+dict conversions go both ways
Sage Weil [Fri, 11 Jun 2021 19:34:27 +0000 (15:34 -0400)]
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>
(cherry picked from commit 16c5cb62f797b0154362678aeed0bf7aebe12f40)

3 years agomgr/nfs: clean up test a bit
Sage Weil [Fri, 11 Jun 2021 19:34:14 +0000 (15:34 -0400)]
mgr/nfs: clean up test a bit

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 59587fd0b4f27e6322935cc1d3773b057f6cb184)

3 years agomgr/nfs/export: fix export validation
Sage Weil [Wed, 9 Jun 2021 13:40:23 +0000 (09:40 -0400)]
mgr/nfs/export: fix export validation

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit fdd47c476e4b6232461a62f956837a049faf6ca0)

3 years agomgr/nfs/export: fix tests
Sage Weil [Tue, 8 Jun 2021 17:38:37 +0000 (13:38 -0400)]
mgr/nfs/export: fix tests

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 473097a36f92d4e6694d0be7b5cac123d723a8e6)

3 years agomgr/nfs: handle option addr/client block in create_export()
Sage Weil [Mon, 7 Jun 2021 20:52:30 +0000 (16:52 -0400)]
mgr/nfs: handle option addr/client block in create_export()

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d6d9e59ef76f33f0f9611acfb6406d849b9e29a8)

3 years agomgr/nfs: allow multiple addrs for new exports
Sage Weil [Mon, 7 Jun 2021 20:45:29 +0000 (16:45 -0400)]
mgr/nfs: allow multiple addrs for new exports

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit aaa57afd2930b6dafcf4dde4e2d939c428d290f4)

3 years agomgr/nfs: fix/finish rgw export
Sage Weil [Mon, 7 Jun 2021 20:38:23 +0000 (16:38 -0400)]
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>
(cherry picked from commit 119555b84d4ae460b59ec74c665a6b215e2ba628)

3 years agomgr/nfs/module: clusterid -> cluster_id
Sage Weil [Mon, 7 Jun 2021 18:51:41 +0000 (14:51 -0400)]
mgr/nfs/module: clusterid -> cluster_id

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit b54998106330cc8e4754a35b872e470a95568ba9)

3 years agomgr/nfs/export: fix export_update_1 to type check
Sage Weil [Wed, 2 Jun 2021 20:16:26 +0000 (16:16 -0400)]
mgr/nfs/export: fix export_update_1 to type check

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 6771de220435d5a8f6ebc7601f0aa451d8e3c68b)

3 years agomgr/nfs/cluster: fix type error
Sage Weil [Wed, 2 Jun 2021 18:43:52 +0000 (14:43 -0400)]
mgr/nfs/cluster: fix type error

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit f9d291b5755520feca393c7fca964de999a6e90a)

3 years agomgr/nfs/export: wrap long lines
Sage Weil [Wed, 2 Jun 2021 18:41:15 +0000 (14:41 -0400)]
mgr/nfs/export: wrap long lines

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 1cb98a04974da044af81b9ab6c998c6f746c6473)

3 years agomgr/nfs: ExportMgr._delete_export only works for cephfs for now
Sebastian Wagner [Wed, 2 Jun 2021 15:54:23 +0000 (17:54 +0200)]
mgr/nfs: ExportMgr._delete_export only works for cephfs for now

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit 8ba3b5bf2e0492c73c0982fa1389cb46edbf2475)

3 years agomgr/nfs: Remove pool_ns from NFSCluster
Sebastian Wagner [Wed, 2 Jun 2021 15:46:52 +0000 (17:46 +0200)]
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>
(cherry picked from commit e6db0c810187fccbd3d5b77576727c63e3fc1cc3)

3 years agomgr/nfs: Remove ExportMgr.rados_namespace
Sebastian Wagner [Wed, 2 Jun 2021 14:20:54 +0000 (16:20 +0200)]
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>
(cherry picked from commit e0a9d9dccf4474253aec43290d54da8f9cd3742d)

3 years agomgr/nfs: flake8
Sebastian Wagner [Wed, 2 Jun 2021 14:04:21 +0000 (16:04 +0200)]
mgr/nfs: flake8

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit a24e912099851a7c77d453afa84154858233e7d8)

Conflicts:
src/pybind/mgr/tox.ini

3 years agomgr/nfs: Add type checking
Sebastian Wagner [Wed, 2 Jun 2021 13:55:02 +0000 (15:55 +0200)]
mgr/nfs: Add type checking

Also introduce RawBlock class

Fixes: https://tracker.ceph.com/issues/50816
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit 42d01c5ed3da749d2af6d3debffd3e117d18856f)

Conflicts:
src/mypy.ini

3 years agomgr/nfs: Add __eq__ method to Export
Sebastian Wagner [Wed, 2 Jun 2021 10:42:54 +0000 (12:42 +0200)]
mgr/nfs: Add __eq__ method to Export

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit b3ddff838461be1805612184a6cd8ccbedb03ae5)

3 years agomgr/nfs: Add some compatibility to mgr/dashboard
Sebastian Wagner [Wed, 2 Jun 2021 10:42:28 +0000 (12:42 +0200)]
mgr/nfs: Add some compatibility to mgr/dashboard

provide default values for `squash` and `security_label`

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit 42a8d383e6b6da46cc4ec011f491f9221b48ec4d)

3 years agomgr/nfs: Fix whitespace handling
Sebastian Wagner [Wed, 2 Jun 2021 10:41:36 +0000 (12:41 +0200)]
mgr/nfs: Fix whitespace handling

keep whitespace in lines starting with %url

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit e1928d57060ca3e180d6b8fc7fe5b8ee8c4aefad)

3 years agomgr/nfs: Copy unit tests from mgr/dashboard
Sebastian Wagner [Wed, 2 Jun 2021 10:40:24 +0000 (12:40 +0200)]
mgr/nfs: Copy unit tests from mgr/dashboard

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit a30328c49677d887c35697aa89619ca1bf6159f4)

3 years agomgr/nfs: partially implement rgw export support
Sage Weil [Tue, 1 Jun 2021 16:23:37 +0000 (12:23 -0400)]
mgr/nfs: partially implement rgw export support

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 377756c9dff1bf690a5be700e99c22d63d0ebad2)

3 years agomgr/nfs: abstract FSAL; add RGWFSAL
Sage Weil [Tue, 1 Jun 2021 16:23:24 +0000 (12:23 -0400)]
mgr/nfs: abstract FSAL; add RGWFSAL

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5c33431ce132ef7fc5db72d0c06cb89c5524c3a1)

3 years agomgr/nfs: refactor to merge 'update' and 'import' code
Sage Weil [Thu, 27 May 2021 23:43:22 +0000 (19:43 -0400)]
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>
(cherry picked from commit 097e4f9aa3b9ed663116381a13eadf279f77b8a2)

3 years agomgr/nfs: add 'nfs export import' command
Sage Weil [Thu, 27 May 2021 23:25:40 +0000 (19:25 -0400)]
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>
(cherry picked from commit 778674a9c728b2b04f1b6922005798303475d352)

3 years agomgr/nfs: refactor 'nfs export update' and export validation
Sage Weil [Thu, 27 May 2021 23:25:06 +0000 (19:25 -0400)]
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>
(cherry picked from commit 2b93356fac49a5bd50a9e4b97314db87ade51666)

3 years agomgr/nfs: fix _fetch_export to distinguish between clusters
Sage Weil [Wed, 26 May 2021 19:55:22 +0000 (15:55 -0400)]
mgr/nfs: fix _fetch_export to distinguish between clusters

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 0eea3d772667a6d9ba4d42427404e8e6730e5df5)

3 years agomgr/nfs: move export ganesha conf translation into caller
Sage Weil [Wed, 26 May 2021 20:27:34 +0000 (16:27 -0400)]
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>
(cherry picked from commit e4b3673262be61ed21178d46cd53ecf7e1969598)

3 years agomgr/nfs: name nfs cephfs client key 'nfs.{cluster_id}.{export_id}'
Sage Weil [Wed, 26 May 2021 20:18:44 +0000 (16:18 -0400)]
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>
(cherry picked from commit 9b1372dc388e5c783208ecc9251598f0985383a8)

3 years agomgr/nfs: add --addr to 'nfs export create'
Sage Weil [Wed, 26 May 2021 18:37:34 +0000 (14:37 -0400)]
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>
(cherry picked from commit 137090dac07f95c3af0b09afc19da210b085019b)

3 years agomgr/nfs: add --squash to 'nfs export create'
Sage Weil [Wed, 26 May 2021 17:59:18 +0000 (13:59 -0400)]
mgr/nfs: add --squash to 'nfs export create'

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 2450447b45110ea98237618eda777e4e9285c6bd)

3 years agomgr/nfs/export_utils: include false but non-None items in config
Sage Weil [Wed, 26 May 2021 17:45:53 +0000 (13:45 -0400)]
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>
(cherry picked from commit fe1155f0151e4619e13eb3df49dc3dd54eb80511)

3 years agovstart.sh: enable nfs module
Sage Weil [Wed, 26 May 2021 17:44:04 +0000 (13:44 -0400)]
vstart.sh: enable nfs module

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9b9c5bc7a4bebec2b03b7ff4367b8964f02614ae)

Conflicts:
src/vstart.sh

3 years agomgr/cephadm: nfs: drop attr_expiration_time from top-level config
Sage Weil [Wed, 26 May 2021 17:43:57 +0000 (13:43 -0400)]
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>
(cherry picked from commit 283a8c184e748a0af5a5deedc2d80b855d747924)

3 years agomgr/cephadm: remove Dir_Chunk = 0
Sage Weil [Wed, 26 May 2021 15:50:59 +0000 (11:50 -0400)]
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>
(cherry picked from commit 9d114e910e953c0adf4ba5d31ab1d17bdfa1f638)

3 years agodoc/cephfs/nfs: update recommendation for versions
Ramana Raja [Tue, 22 Jun 2021 02:47:55 +0000 (22:47 -0400)]
doc/cephfs/nfs: update recommendation for versions

... of Ceph and NFS-Ganesha packages.

Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit e031a5969120c43adc5b20ca004e6540dffd1579)

Conflicts:
doc/cephfs/nfs.rst

3 years agomgr/nfs: fix 'nfs export create' argument order
Sage Weil [Fri, 4 Jun 2021 17:35:46 +0000 (13:35 -0400)]
mgr/nfs: fix 'nfs export create' argument order

Put path before --readonly so that it can still be positional.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit ffce51af8e7be9835ff01c8d9a5f378f19d4d746)

3 years agoqa/tasks/cephfs/test_nfs: fix export create test
Sage Weil [Tue, 1 Jun 2021 17:39:03 +0000 (13:39 -0400)]
qa/tasks/cephfs/test_nfs: fix export create test

Everything after --readonly is non-positional.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 8683cccd06077bfbfd39e9e5ca3750078937dc0e)

3 years agomgr/k8sevents: fix help strings
Sage Weil [Sun, 23 May 2021 14:34:26 +0000 (10:34 -0400)]
mgr/k8sevents: fix help strings

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit fd77020e73bb43f254ec8a4ee7093dccd1b63ff9)

3 years agopybind/mgr/mgr_module: fix help desc formatting
Sage Weil [Sat, 22 May 2021 17:33:40 +0000 (13:33 -0400)]
pybind/mgr/mgr_module: fix help desc formatting

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 4bc37ba3b53930589f2fcd3f137b45ea9872f9e6)

3 years agomgr/orchestrator: clean up 'orch {daemon add,apply} rgw' args
Sage Weil [Sat, 22 May 2021 17:28:37 +0000 (13:28 -0400)]
mgr/orchestrator: clean up 'orch {daemon add,apply} rgw' args

Make placement the only optional positional.  This means that the "usual"
'orch orch apply <whatever> 3' will do placement=3.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 5d8cfb149b34d068b4dd6942e9a38e40aced299f)

Conflicts:
  src/pybind/mgr/orchestrator/module.py

3 years agomgr/orchestrator: reformat a few methods
Sage Weil [Sat, 22 May 2021 17:21:04 +0000 (13:21 -0400)]
mgr/orchestrator: reformat a few methods

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 27c2b83a8e4c7efd319fcd6c1b80698f76dea6c4)

3 years agodoc/cephfs/nfs: remove documented limitation
Sage Weil [Mon, 24 May 2021 21:03:33 +0000 (16:03 -0500)]
doc/cephfs/nfs: remove documented limitation

At the time NFS support was added, this limitation applied.
However, in
 https://github.com/nfs-ganesha/nfs-ganesha/commit/b3d97f8157a131f55d848ff57e46af91b746b944
and
 https://github.com/nfs-ganesha/nfs-ganesha/commit/1cfe7e2df96f9785367ba94d41559140f584a875
we added support for multiple filesystems and started mixing
the fscid into the filehandle.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit a534f7be3601a18cd7e26af67031f2dfe3fead7b)

Conflicts:
doc/cephfs/nfs.rst

3 years agoMerge pull request #42939 from batrick/i51832
Yuri Weinstein [Wed, 1 Sep 2021 21:16:59 +0000 (14:16 -0700)]
Merge pull request #42939 from batrick/i51832

pacific: mds: META_POP_READDIR, META_POP_FETCH, META_POP_STORE, and cache_hit_rate are not updated

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge pull request #42938 from batrick/i51932
Yuri Weinstein [Wed, 1 Sep 2021 21:16:17 +0000 (14:16 -0700)]
Merge pull request #42938 from batrick/i51932

pacific: mds: MDCache.cc:5319 FAILED ceph_assert(rejoin_ack_gather.count(mds->get_nodeid()))

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge pull request #42936 from batrick/i51198
Yuri Weinstein [Wed, 1 Sep 2021 21:15:38 +0000 (14:15 -0700)]
Merge pull request #42936 from batrick/i51198

pacific: msg: active_connections regression

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge pull request #42935 from batrick/i51935
Yuri Weinstein [Wed, 1 Sep 2021 21:14:45 +0000 (14:14 -0700)]
Merge pull request #42935 from batrick/i51935

pacific: mds: add debugging when rejecting mksnap with EPERM

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge pull request #42956 from ifed01/wip-ifed-fix-huge-omap-rename-pac
Yuri Weinstein [Wed, 1 Sep 2021 18:59:40 +0000 (11:59 -0700)]
Merge pull request #42956 from ifed01/wip-ifed-fix-huge-omap-rename-pac

pacific: os/bluestore: cap omap naming scheme upgrade transaction.

Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #42534 from liewegas/use-quay-pacific
Sebastian Wagner [Wed, 1 Sep 2021 10:54:21 +0000 (12:54 +0200)]
Merge pull request #42534 from liewegas/use-quay-pacific

pacific: cephadm: use quay, not docker

Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
3 years agoMerge pull request #42889 from rhcs-dashboard/wip-52378-pacific
Ernesto Puerta [Wed, 1 Sep 2021 10:25:24 +0000 (12:25 +0200)]
Merge pull request #42889 from rhcs-dashboard/wip-52378-pacific

pacific: mgr/dashboard: stats=false not working when listing buckets

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
3 years agoMerge pull request #42974 from s0nea/wip-52308-pacific
Ernesto Puerta [Wed, 1 Sep 2021 09:29:40 +0000 (11:29 +0200)]
Merge pull request #42974 from s0nea/wip-52308-pacific

pacific: mgr/dashboard: don't notify for suppressed alerts

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>