]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
5 years agomgr/volumes/nfs: Check cluster availability in export command methods
Varsha Rao [Mon, 15 Jun 2020 15:47:59 +0000 (21:17 +0530)]
mgr/volumes/nfs: Check cluster availability in export command methods

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

5 years agomgr/volumes/nfs: Misc changes to export get and ls command
Varsha Rao [Mon, 15 Jun 2020 11:29:41 +0000 (16:59 +0530)]
mgr/volumes/nfs: Misc changes to export get and ls command

This patch does following changes:
* Add extra line before every class definition
* Reorder export dictionary
* Use _fetch_export() in get export command
* Remove cluster_id key from export dictionary if single export is deleted

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

5 years agoqa/tasks/cephfs: Add test for nfs cluster ls command
Varsha Rao [Thu, 11 Jun 2020 05:27:50 +0000 (10:57 +0530)]
qa/tasks/cephfs: Add test for nfs cluster ls command

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

5 years agomgr/volumes/nfs: Add nfs cluster ls command
Varsha Rao [Thu, 11 Jun 2020 05:18:56 +0000 (10:48 +0530)]
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>
(cherry picked from commit b77c3eef7803c77f3596347dd1ca145e118e80b3)

5 years agomgr/volumes/nfs: Remove 'ganesha-' prefix from orch returned service id
Varsha Rao [Wed, 10 Jun 2020 13:00:24 +0000 (18:30 +0530)]
mgr/volumes/nfs: Remove 'ganesha-' prefix from orch returned service id

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

5 years agoqa/tasks/cephfs: Add test to check if export is available on restarting mgr
Varsha Rao [Tue, 9 Jun 2020 07:44:36 +0000 (07:44 +0000)]
qa/tasks/cephfs: Add test to check if export is available on restarting mgr

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

5 years agomgr/volumes/nfs: get export in a nfs cluster
Ramana Raja [Fri, 5 Jun 2020 10:38:14 +0000 (16:08 +0530)]
mgr/volumes/nfs: get export in a nfs cluster

Fixes: https://tracker.ceph.com/issues/45741
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 7dcefb158d2999715856ffa12cce9b92e6a12b23)

5 years agomgr/volumes/nfs: list exports within a ganesha cluster
Ramana Raja [Sun, 14 Jun 2020 16:33:16 +0000 (22:03 +0530)]
mgr/volumes/nfs: list exports within a ganesha cluster

List the pseudo paths of the exports within a ganesha cluster
with `nfs export ls <cluster ID>` command.

List all the details of the exports within a ganesha cluster
with `nfs export ls <cluster ID> --detailed` command.

Partially-fixes: https://tracker.ceph.com/issues/45741
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 6f8d20f2cbcdb5a0351a050abd6d66c0c840c108)

5 years agomgr/volumes/nfs: Check if cluster exists before creating exports
Varsha Rao [Fri, 5 Jun 2020 10:33:01 +0000 (16:03 +0530)]
mgr/volumes/nfs: Check if cluster exists before creating exports

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

5 years agomgr/volumes/nfs: Fetch exports in persistent way if mgr is restarted
Varsha Rao [Fri, 5 Jun 2020 09:14:59 +0000 (14:44 +0530)]
mgr/volumes/nfs: Fetch exports in persistent way if mgr is restarted

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

5 years agomgr/volume/nfs: allow only [A-Za-z0-9-_.] characters
Ramana Raja [Thu, 4 Jun 2020 06:46:49 +0000 (12:16 +0530)]
mgr/volume/nfs: allow only [A-Za-z0-9-_.] characters

... for ganesha cluster names.

Fixes: https://tracker.ceph.com/issues/45744
Signed-off-by: Ramana Raja <rraja@redhat.com>
(cherry picked from commit 7ae24c22f6531c3450e56d59b2fba48689ef775f)

5 years agoqa/tasks/cephfs: Add idempotency test for nfs commands
Varsha Rao [Tue, 2 Jun 2020 11:34:19 +0000 (11:34 +0000)]
qa/tasks/cephfs: Add idempotency test for nfs commands

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

5 years agomgr/volumes/nfs: Reorder imports
Varsha Rao [Wed, 24 Jun 2020 05:14:57 +0000 (05:14 +0000)]
mgr/volumes/nfs: Reorder imports

This patch reorders import to fix "ImportError: cannot import name 'TimedOut'".
As flake8 requires similar import types to be grouped together.

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

5 years agoqa/tasks/cephfs/test_nfs.py: flake8 fixes
Kefu Chai [Sat, 20 Jun 2020 02:49:45 +0000 (10:49 +0800)]
qa/tasks/cephfs/test_nfs.py: flake8 fixes

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 981a7cc923ed9ddb61c5b83940d42b82ca7a4469)

5 years agoqa/tasks/cephfs/nfs: Poll for max 60 seconds to ensure removal of ganesha services
Varsha Rao [Fri, 19 Jun 2020 09:00:22 +0000 (14:30 +0530)]
qa/tasks/cephfs/nfs: Poll for max 60 seconds to ensure removal of ganesha services

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

5 years agovstart: just use ganesha.nfsd that's in $PATH
Jeff Layton [Mon, 22 Jun 2020 12:31:46 +0000 (08:31 -0400)]
vstart: just use ganesha.nfsd that's in $PATH

In an earlier patch, I added a --ganesha-path option, but that left out
ganesha-rados-grace, which also could be in an alternate path. Instead,
just change vstart to run whatever ganesha.nfsd it finds in $PATH. We
already do that for ganesha-rados-grace so it should be fine to do that
for ganesha.nfsd as well.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit eab8c8136dc5379efde28e62f195437997c9db7f)

Conflicts:
src/vstart.sh

- Removed bluestore-zoned option as pr(#35111) is not backported yet.

5 years agovstart: Add ip value to nfs mount information
Varsha Rao [Mon, 22 Jun 2020 18:38:50 +0000 (00:08 +0530)]
vstart: Add ip value to nfs mount information

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

5 years agopybind/mgr/volumes/nfs: Remove unused cephfs module
Varsha Rao [Fri, 19 Jun 2020 17:55:53 +0000 (23:25 +0530)]
pybind/mgr/volumes/nfs: Remove unused cephfs module

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

5 years agomgr/volumes/nfs: Ignore if ganesha disconnects
Varsha Rao [Thu, 18 Jun 2020 08:47:11 +0000 (14:17 +0530)]
mgr/volumes/nfs: Ignore if ganesha disconnects

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

5 years agomgr/volumes/nfs: use f-string for creating Exception
Kefu Chai [Wed, 17 Jun 2020 04:34:17 +0000 (12:34 +0800)]
mgr/volumes/nfs: use f-string for creating Exception

for better understanding the reason of the failure

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5b8ba6648d6e43d34c3f15b228a17843c5c9b1de)

5 years agovstart: allow specifying a different ganesha binary
Jeff Layton [Wed, 17 Jun 2020 19:49:52 +0000 (15:49 -0400)]
vstart: allow specifying a different ganesha binary

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 06d29a717a20190a98b1b9e3b9306fea163f1ecb)

Conflicts:
src/vstart.sh

- Removed bluestore-zoned option as pr(#35111) is not backported yet.

5 years agovstart: handle multiple ganesha's more sanely
Jeff Layton [Wed, 17 Jun 2020 16:11:51 +0000 (12:11 -0400)]
vstart: handle multiple ganesha's more sanely

Currently, if you have more than one ganesha daemon, it clobbers the
log, config and pidfiles from the previous daemons. Give them each
their own files.

While we're in here, move the log and pidfile to the out/ directory
with all of the other logfiles/pidfiles.

Fixes: https://tracker.ceph.com/issues/46079
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit eea01dfa78738e3b3c67751d00d2430a1ff6ee5d)

5 years agovstart.sh: update comment to use ganesha from CentOS Storage SIG
Kefu Chai [Tue, 16 Jun 2020 09:03:13 +0000 (17:03 +0800)]
vstart.sh: update comment to use ganesha from CentOS Storage SIG

see https://download.nfs-ganesha.org/3/LATEST/RHEL/

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9c91062b85b6886798ff1cca08e85b09b5a706f7)

5 years agovstart: set $CEPH_CONF when running ganesha-rados-grace
Jeff Layton [Wed, 10 Jun 2020 19:55:24 +0000 (15:55 -0400)]
vstart: set $CEPH_CONF when running ganesha-rados-grace

...otherwise we could pick up the wrong ceph.conf file. Also, use the
correct $test_user userid for these ops.

Fixes: https://tracker.ceph.com/issues/45971
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 9882a69818457580cbaa318d7a50ff6ddb09ee69)

5 years agovstart: Support deployment of ganesha daemon by cephadm with NFS option.
Varsha Rao [Mon, 1 Jun 2020 15:32:53 +0000 (21:02 +0530)]
vstart: Support deployment of ganesha daemon by cephadm with NFS option.

NFS Ganesha cluster can be created in two ways with vstart
cluster:

1) With test_orchestrator
NFS=1 ../src/vstart.sh
This type of deployment can have multiple ganesha daemons on random port.

2) With Cephadm
NFS=1 ../src/vstart.sh --cephadm
It can deploy only single ganesha daemon with vstart on default ganesha port.

Both can create multiple cephfs exports.

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

5 years agomgr/test_orchestrator: List nfs daemon
Varsha Rao [Mon, 1 Jun 2020 15:27:45 +0000 (20:57 +0530)]
mgr/test_orchestrator: List nfs daemon

This patch adds dummy data for nfs ganesha daemon and adds nfs to list of
supported service type.

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

5 years agoqa/tasks/cephfs: Enable multiple exports tests
Varsha Rao [Fri, 29 May 2020 18:06:34 +0000 (23:36 +0530)]
qa/tasks/cephfs: Enable multiple exports tests

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

5 years agomgr/nfs: Instead of 'auth del' use 'auth rm'
Varsha Rao [Fri, 29 May 2020 17:54:54 +0000 (23:24 +0530)]
mgr/nfs: Instead of 'auth del' use 'auth rm'

`mgr` profile allows 'auth rm'. Use it instead of 'auth del' which is not
allowed.

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

5 years agoqa/tasks/cephfs: Don't enable cephadm in TestNFS
Varsha Rao [Fri, 29 May 2020 09:54:03 +0000 (15:24 +0530)]
qa/tasks/cephfs: Don't enable cephadm in TestNFS

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

5 years agoqa/tasks/cephfs: Add tests for nfs exports
Varsha Rao [Thu, 28 May 2020 10:57:25 +0000 (10:57 +0000)]
qa/tasks/cephfs: Add tests for nfs exports

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

5 years agomgr/volumes/nfs: Fix idempotency of cluster and export commands
Varsha Rao [Thu, 28 May 2020 10:14:56 +0000 (15:44 +0530)]
mgr/volumes/nfs: Fix idempotency of cluster and export commands

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

5 years agomgr/volumes/nfs: Fix incorrect read only access_type value
Varsha Rao [Tue, 26 May 2020 10:17:55 +0000 (15:47 +0530)]
mgr/volumes/nfs: Fix incorrect read only access_type value

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

5 years agomgr/fs/nfs: Use check_mon_command() instead of mon_command()
Varsha Rao [Tue, 26 May 2020 10:13:40 +0000 (15:43 +0530)]
mgr/fs/nfs: Use check_mon_command() instead of mon_command()

check_mon_command() checks the return code of mon command.

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

5 years agoqa/cephfs: Add tests for nfs
Varsha Rao [Thu, 30 Apr 2020 10:10:52 +0000 (15:40 +0530)]
qa/cephfs: Add tests for nfs

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

5 years agomgr/volumes/nfs: Remove type option from export create interface
Varsha Rao [Fri, 15 May 2020 17:56:13 +0000 (23:26 +0530)]
mgr/volumes/nfs: Remove type option from export create interface

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

5 years agovstart: Instead of CACHEINODE use MDCACHE
Varsha Rao [Fri, 15 May 2020 16:04:03 +0000 (21:34 +0530)]
vstart: Instead of CACHEINODE use MDCACHE

CACHEINODE will be deprecated soon. Instead use MDCACHE.

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

5 years agomgr/volumes: Rearrange nfs export interface
Varsha Rao [Thu, 14 May 2020 16:00:46 +0000 (21:30 +0530)]
mgr/volumes: Rearrange nfs export interface

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

5 years agomgr/volumes/nfs: Delete common config object on cluster deletion
Varsha Rao [Thu, 14 May 2020 15:45:58 +0000 (21:15 +0530)]
mgr/volumes/nfs: Delete common config object on cluster deletion

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

5 years agomgr/volumes/nfs: Delete all exports on cluster deletion
Varsha Rao [Thu, 14 May 2020 13:46:35 +0000 (19:16 +0530)]
mgr/volumes/nfs: Delete all exports on cluster deletion

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

5 years agomgr/volumes: Make nfs create export interface idempotent
Varsha Rao [Thu, 14 May 2020 11:16:48 +0000 (16:46 +0530)]
mgr/volumes: Make nfs create export interface idempotent

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

5 years agovstart: Add watch url for conf-nfs object
Varsha Rao [Wed, 6 May 2020 10:20:12 +0000 (15:50 +0530)]
vstart: Add watch url for conf-nfs object

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

5 years agomgr/volumes/nfs: Delete user on removing export
Varsha Rao [Tue, 5 May 2020 10:38:49 +0000 (16:08 +0530)]
mgr/volumes/nfs: Delete user on removing export

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

5 years agomgr/volumes: Create user for given path and fs
Varsha Rao [Tue, 5 May 2020 10:09:48 +0000 (15:39 +0530)]
mgr/volumes: Create user for given path and fs

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

5 years agovstart: Ensure cephadm and NFS does not conflict
Varsha Rao [Mon, 4 May 2020 14:13:12 +0000 (19:43 +0530)]
vstart: Ensure cephadm and NFS does not conflict

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

5 years agovstart: Update details about ganesha packages
Varsha Rao [Mon, 4 May 2020 14:05:47 +0000 (19:35 +0530)]
vstart: Update details about ganesha packages

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

5 years agomgr/volumes/nfs: Add delete cephfs export command
Varsha Rao [Tue, 28 Apr 2020 16:27:20 +0000 (21:57 +0530)]
mgr/volumes/nfs: Add delete cephfs export command

$ ceph nfs export delete <binding> <clusterid>

binding: It is the pseudo root name
clusterid: It is name of the cluster

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

5 years agomgr/volumes/nfs: Add RADOS notify for common config object
Varsha Rao [Tue, 28 Apr 2020 11:49:32 +0000 (17:19 +0530)]
mgr/volumes/nfs: Add RADOS notify for common config object

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

5 years agomgr/volumes/nfs: Pass cluster_id directly to NFSCluster {create, update, delete}...
Varsha Rao [Mon, 27 Apr 2020 11:30:03 +0000 (17:00 +0530)]
mgr/volumes/nfs: Pass cluster_id directly to NFSCluster {create, update, delete} methods

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

5 years agomgr/volumes: Add nfs cluster delete interface
Varsha Rao [Thu, 23 Apr 2020 15:46:16 +0000 (21:16 +0530)]
mgr/volumes: Add nfs cluster delete interface

$ ceph nfs cluster delete <clusterid>

This deletes the deployed cluster.

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

5 years agomgr/volumes: Add nfs cluster update interface
Varsha Rao [Thu, 23 Apr 2020 13:40:48 +0000 (19:10 +0530)]
mgr/volumes: Add nfs cluster update interface

$ ceph nfs cluster update <clusterid> <placement>

This updates the existing deployed cluster according to placement value.

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

5 years agovstart: Enable test_orchestrator in start_ganesha()
Varsha Rao [Tue, 21 Apr 2020 13:20:04 +0000 (18:50 +0530)]
vstart: Enable test_orchestrator in start_ganesha()

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

5 years agomgr/volumes: Add placement option to create nfs cluster interface
Varsha Rao [Tue, 21 Apr 2020 12:53:04 +0000 (18:23 +0530)]
mgr/volumes: Add placement option to create nfs cluster interface

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

5 years agomgr/volumes/nfs: Change common ganesha config object name to 'conf-nfs.ganesha-<clust...
Varsha Rao [Tue, 21 Apr 2020 09:56:57 +0000 (15:26 +0530)]
mgr/volumes/nfs: Change common ganesha config object name to 'conf-nfs.ganesha-<cluster_id>'

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

5 years agomgr/volumes/nfs: Call orch nfs apply
Varsha Rao [Mon, 20 Apr 2020 06:12:18 +0000 (11:42 +0530)]
mgr/volumes/nfs: Call orch nfs apply

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

5 years agomgr/volumes: Add a note about placement option in nfs cluster create
Varsha Rao [Wed, 8 Apr 2020 06:13:57 +0000 (11:43 +0530)]
mgr/volumes: Add a note about placement option in nfs cluster create

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

5 years agomgr/volumes: Remove unused typing module
Varsha Rao [Wed, 8 Apr 2020 06:09:29 +0000 (11:39 +0530)]
mgr/volumes: Remove unused typing module

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

5 years agomgr/volumes: Make cluster id option mandatory in nfs create export
Varsha Rao [Mon, 6 Apr 2020 14:24:37 +0000 (19:54 +0530)]
mgr/volumes: Make cluster id option mandatory in nfs create export

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

5 years agomgr/volumes: Update nfs cluster and export interface
Varsha Rao [Wed, 1 Apr 2020 16:01:26 +0000 (21:31 +0530)]
mgr/volumes: Update nfs cluster and export interface

Instead of prefixing 'fs' to the commands, type is added for easy extension to
create rgw exports.

$ ceph nfs cluster create <type=cephfs> [--size=1] <clusterid>
$ ceph nfs export create <type=cephfs> <fsname> <binding> [--readonly] [--path=/path/in/cephfs] [--attach=<clusterid>]

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

5 years agovstart: Update the nfs cluster create and export interface
Varsha Rao [Wed, 1 Apr 2020 15:34:58 +0000 (21:04 +0530)]
vstart: Update the nfs cluster create and export interface

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

5 years agomgr/volumes: Remove GaneshaConf and NFSConfig class
Varsha Rao [Wed, 1 Apr 2020 11:18:30 +0000 (16:48 +0530)]
mgr/volumes: Remove GaneshaConf and NFSConfig class

NFSCluster and FSExport class replace GaneshaConf and NFSConfig class.

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

5 years agomgr/volumes: Create multiple CephFS exports
Varsha Rao [Tue, 31 Mar 2020 11:48:03 +0000 (17:18 +0530)]
mgr/volumes: Create multiple CephFS exports

Using the following fs nfs interface multiple exports can be created:
ceph fs nfs export create <fsname> <binding> --readonly --path=<pathname> --attach=<clusterid>

Note: Binding is pseudo path.

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

5 years agomgr/volumes: Move ganesha common config to vstart
Varsha Rao [Mon, 30 Mar 2020 10:17:15 +0000 (15:47 +0530)]
mgr/volumes: Move ganesha common config to vstart

This is a preparatoy patch before calling orchestrator for nfs cluster
deployment. All the ganesha config is moved to vstart. Keyring creation is also
taken care by vstart.

The volumes fs nfs cluster create interface does the following things:
1) Create a common recovery pool for all ganesha clusters. Each cluster will
   have their own namespace.
2) Create an empty rados conf object named 'conf-nfs' for saving all export
   urls.

Call to orch interface will be done in future patch.

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

5 years agomgr/volumes/nfs: Fix mypy errors
Varsha Rao [Tue, 24 Mar 2020 18:56:56 +0000 (00:26 +0530)]
mgr/volumes/nfs: Fix mypy errors

This patch fixes the following mypy errors:
volumes/module.py:9: note: In module imported here,
volumes/__init__.py:2: note: ... from here:
volumes/fs/nfs.py: note: In member "validate_path" of class "CephFSFSal":
volumes/fs/nfs.py:80: error: Name 're' is not defined
volumes/fs/nfs.py: note: In member "create_path" of class "CephFSFSal":
volumes/fs/nfs.py:83: error: Name 'CephFS' is not defined
volumes/fs/nfs.py: note: In member "_persist_daemon_configuration" of class "GaneshaConf":
volumes/fs/nfs.py:259: error: Need type annotation for 'daemon_map' (hint: "daemon_map: Dict[<type>, <type>] = ...")
volumes/fs/nfs.py: note: In member "create_instance" of class "NFSConfig":
volumes/fs/nfs.py:386: error: Incompatible types in assignment (expression has type "GaneshaConf", variable has type "str")
volumes/fs/nfs.py: note: In member "create_export" of class "NFSConfig":
volumes/fs/nfs.py:389: error: "str" has no attribute "create_export"
volumes/fs/nfs.py: note: In member "delete_export" of class "NFSConfig":
volumes/fs/nfs.py:404: error: "str" has no attribute "has_export"
volumes/fs/nfs.py:407: error: "str" has no attribute "remove_export"
volumes/fs/nfs.py:408: error: "str" has no attribute "reload_daemons"
volumes/__init__.py:2: note: In module imported here:
volumes/module.py: note: In member "_cmd_fs_nfs_export_create" of class "Module":
volumes/module.py:406: error: "str" has no attribute "check_fsal_valid"
volumes/module.py:407: error: "str" has no attribute "create_instance"
volumes/module.py:408: error: "str" has no attribute "create_export"
volumes/module.py: note: In member "_cmd_fs_nfs_export_delete" of class "Module":
volumes/module.py:412: error: "str" has no attribute "delete_export"
volumes/module.py: note: In member "_cmd_fs_nfs_cluster_create" of class "Module":
volumes/module.py:415: error: Incompatible types in assignment (expression has type "NFSConfig", variable has type "str")
volumes/module.py:416: error: "str" has no attribute "create_nfs_cluster"

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

5 years agomgr/volumes/nfs: Update the export class to remove unecessary config options
Varsha Rao [Tue, 24 Mar 2020 18:13:40 +0000 (23:43 +0530)]
mgr/volumes/nfs: Update the export class to remove unecessary config options

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

5 years agomgr/volumes: Remove dependency on dashboard ganesha module
Varsha Rao [Tue, 24 Mar 2020 11:13:09 +0000 (16:43 +0530)]
mgr/volumes: Remove dependency on dashboard ganesha module

Instead of importing ganesha module, necessary classes are directly used in
volumes nfs module.

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

5 years agovstart: Use random port instead of default Ganesha port
Varsha Rao [Tue, 24 Mar 2020 09:56:51 +0000 (15:26 +0530)]
vstart: Use random port instead of default Ganesha port

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

5 years agovstart: Use "NFS" instead "GANESHA" for starting nfs ganesha clusters
Varsha Rao [Fri, 6 Mar 2020 20:33:51 +0000 (02:03 +0530)]
vstart: Use "NFS" instead "GANESHA" for starting nfs ganesha clusters

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

5 years agomgr/volumes: Improve readability of ganesha common config
Varsha Rao [Fri, 6 Mar 2020 20:19:30 +0000 (01:49 +0530)]
mgr/volumes: Improve readability of ganesha common config

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

5 years agovstart: Add note about mounting cephfs exports
Varsha Rao [Fri, 6 Mar 2020 19:56:57 +0000 (01:26 +0530)]
vstart: Add note about mounting cephfs exports

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

5 years agosrc/vstart: Set CEPH_CONF environment variables
Varsha Rao [Thu, 5 Mar 2020 09:56:03 +0000 (15:26 +0530)]
src/vstart: Set CEPH_CONF environment variables

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

5 years agomgr/volumes/fs: Update default ganesha conf options
Varsha Rao [Tue, 3 Mar 2020 13:42:58 +0000 (19:12 +0530)]
mgr/volumes/fs: Update default ganesha conf options

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

5 years agodoc: Add document about fs nfs interface to create CephFS exports
Varsha Rao [Tue, 25 Feb 2020 14:21:06 +0000 (19:51 +0530)]
doc: Add document about fs nfs interface to create CephFS exports

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

5 years agovstart: Update fs nfs export create command
Varsha Rao [Tue, 25 Feb 2020 10:45:25 +0000 (16:15 +0530)]
vstart: Update fs nfs export create command

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

5 years agomgr/volumes: Update nfs export create and delete command
Varsha Rao [Tue, 25 Feb 2020 08:31:07 +0000 (14:01 +0530)]
mgr/volumes: Update nfs export create and delete command

Remove fill_keys function and add key to nfsconfig object.
Export create and delete methods that no longer require ganeshaconf object to
be passed.

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

5 years agomgr/volumes: Remove create_rados_pool method
Varsha Rao [Tue, 25 Feb 2020 07:27:44 +0000 (12:57 +0530)]
mgr/volumes: Remove create_rados_pool method

Pool is created by cluster command.

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

5 years agomgr/volumes: Changes to nfs export delete and create
Varsha Rao [Mon, 24 Feb 2020 12:19:14 +0000 (17:49 +0530)]
mgr/volumes: Changes to nfs export delete and create

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

5 years agomgr/volumes: While creating nfs-ganesha user update its cap
Varsha Rao [Fri, 21 Feb 2020 06:09:45 +0000 (11:39 +0530)]
mgr/volumes: While creating nfs-ganesha user update its cap

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

5 years agomgr/volumes: Update caps for new user created and add it's key to keyring
Varsha Rao [Wed, 19 Feb 2020 13:26:52 +0000 (18:56 +0530)]
mgr/volumes: Update caps for new user created and add it's key to keyring

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

5 years agovstart: Update vstart according to cluster create command
Varsha Rao [Wed, 12 Feb 2020 07:58:23 +0000 (13:28 +0530)]
vstart: Update vstart according to cluster create command

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

5 years agomgr/volumes: Add Ganesha common config
Varsha Rao [Wed, 12 Feb 2020 07:48:27 +0000 (13:18 +0530)]
mgr/volumes: Add Ganesha common config

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

5 years agomgr/volumes: Create NFSConfig class
Varsha Rao [Thu, 30 Jan 2020 04:37:44 +0000 (10:07 +0530)]
mgr/volumes: Create NFSConfig class

Move the ganesha config functions into this class.

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

5 years agomgr/volumes: Add command to create nfs-ganesha clusters
Varsha Rao [Mon, 27 Jan 2020 10:06:48 +0000 (15:36 +0530)]
mgr/volumes: Add command to create nfs-ganesha clusters

ceph fs nfs cluster create <cluster_id> [--size=1]

cluster_id: Name of the nfs cluster

This command creates a common recovery pool for all Ganesha daemons, creates
new user and nfs cluster. Orchestrator needs to be enabled.

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

5 years agomgr: Create pool for nfs ganesha recovery
Varsha Rao [Fri, 3 Jan 2020 13:21:28 +0000 (18:51 +0530)]
mgr: Create pool for nfs ganesha recovery

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

5 years agomgr: Add "ceph fs nfs delete <export_id>" to delete exports
Varsha Rao [Thu, 19 Dec 2019 12:03:39 +0000 (17:33 +0530)]
mgr: Add "ceph fs nfs delete <export_id>" to delete exports

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

5 years agomgr: Add command to create exports for nfs-ganesha
Varsha Rao [Fri, 22 Nov 2019 05:34:01 +0000 (11:04 +0530)]
mgr: Add command to create exports for nfs-ganesha

'ceph fs nfs create': This command creates export objects for nfs-ganesha.
vstart ganesha daemon fetches the export block from rados object.

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

5 years agoMerge pull request #35711 from rhcs-dashboard/wip-46020-octopus
Yuri Weinstein [Tue, 7 Jul 2020 23:04:54 +0000 (16:04 -0700)]
Merge pull request #35711 from rhcs-dashboard/wip-46020-octopus

octopus: mgr/dashboard: work with v1 RBD images

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agoMerge pull request #35620 from rhcs-dashboard/wip-46048-octopus
Lenz Grimmer [Tue, 7 Jul 2020 13:49:34 +0000 (15:49 +0200)]
Merge pull request #35620 from rhcs-dashboard/wip-46048-octopus

octopus: mgr/dashboard: cropped actions menu in nested details

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
5 years agoMerge pull request #35705 from tspmelo/wip-45855-octopus
Laura Paduano [Tue, 7 Jul 2020 12:31:50 +0000 (14:31 +0200)]
Merge pull request #35705 from tspmelo/wip-45855-octopus

octopus: mgr/dashboard: Improve Summary's subscribe methods

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agoMerge pull request #35883 from bk201/wip-46314-octopus
Lenz Grimmer [Tue, 7 Jul 2020 11:02:23 +0000 (13:02 +0200)]
Merge pull request #35883 from bk201/wip-46314-octopus

octopus: mgr/dashboard: fix wal/db slots controls in the OSD form

Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agomgr/dashboard: cropped actions menu in nested details 35620/head
Avan Thakkar [Thu, 28 May 2020 16:14:15 +0000 (21:44 +0530)]
mgr/dashboard: cropped actions menu in nested details

Fixes: https://tracker.ceph.com/issues/45508
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit ec3c731d2dc28839984e94f6faddab761ea1a7a5)
(cherry picked from commit 9d56135ff704043860f5dc52afd02819abdfc8af)

5 years agoMerge pull request #35885 from rhcs-dashboard/wip-46313-octopus
Lenz Grimmer [Mon, 6 Jul 2020 12:30:25 +0000 (14:30 +0200)]
Merge pull request #35885 from rhcs-dashboard/wip-46313-octopus

octopus: mgr/dashboard: Prometheus query error in the metrics of Pools, OSDs and RBD images

Reviewed-by: Patrick Seidensal <pnawracay@suse.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
5 years agoMerge PR #35759 into octopus
Patrick Donnelly [Thu, 2 Jul 2020 16:44:27 +0000 (09:44 -0700)]
Merge PR #35759 into octopus

* refs/pull/35759/head:
qa: fix flake8 warnings
doc: add documentation for new ephemeral pinning feature
pybind/mgr/volumes: wire up pinning subvolumes/subvolumegroups
qa: adapt tests for empty pinned dir export
qa: break export pin tests into discrete tests
qa: add more ephemeral pin tests
qa: add tests for ephemeral pinning
mds: add maximum random ephemeral pin percentage
mds: replicate random pin state
mds: finish implementation of ephemeral pins
mds: do string equality comparison
mds: add ephemeral pinning for subtrees
mds: trim pinned and empty subtrees
mds: refactor remove_subtree
mds: allow export of pinned directory if empty
mds: reduce subtree processing verbosity
mds: skip export of empty directories
mds: remove frozen export pin from queue
mds: simplify for loop construction
mds: add debug messages for export queue processing
qa: refactor _wait_subtree and _get_subtree
qa: use status from wait_for_daemons
qa: quietly print json output from asok commands

Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
5 years agoMerge pull request #35568 from sebastian-philipp/octopus-backport-34633-35099-35459...
Sebastian Wagner [Thu, 2 Jul 2020 09:26:52 +0000 (11:26 +0200)]
Merge pull request #35568 from sebastian-philipp/octopus-backport-34633-35099-35459-35521-35504-35474-35538

octopus: cephadm batch backport June (3)

Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>
5 years agomgr/dashboard: Prometheus query error in the metrics of Pools, OSDs and RBD images 35885/head
Avan Thakkar [Mon, 13 Apr 2020 09:50:00 +0000 (15:20 +0530)]
mgr/dashboard: Prometheus query error in the metrics of Pools, OSDs and RBD images
Fixes: https://tracker.ceph.com/issues/45068
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit 47b515c09496da8fc326300bab6618250466effe)

5 years agomgr/dashboard: fix wal/db slots controls in the OSD form 35883/head
Kiefer Chang [Mon, 15 Jun 2020 07:16:57 +0000 (15:16 +0800)]
mgr/dashboard: fix wal/db slots controls in the OSD form

Controls should be updated immediately after changing.

Fixes: https://tracker.ceph.com/issues/44985
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
(cherry picked from commit 2a7b392d873f224e71c50d2916dbd1a63e4360f9)

5 years agoqa: fix flake8 warnings 35759/head
Patrick Donnelly [Wed, 24 Jun 2020 17:26:16 +0000 (10:26 -0700)]
qa: fix flake8 warnings

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 683153c56e4db9ac5d17dbdcc6b741a27fb37062)

5 years agodoc: add documentation for new ephemeral pinning feature
Patrick Donnelly [Tue, 9 Jun 2020 22:30:28 +0000 (15:30 -0700)]
doc: add documentation for new ephemeral pinning feature

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 6cd10c591af61c37f7175c9cd6873568caa099f6)

5 years agopybind/mgr/volumes: wire up pinning subvolumes/subvolumegroups
Patrick Donnelly [Wed, 10 Jun 2020 04:14:23 +0000 (21:14 -0700)]
pybind/mgr/volumes: wire up pinning subvolumes/subvolumegroups

Fixes: https://tracker.ceph.com/issues/41541
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 982041e89d6db6aa764e287a05f1c2937efa719a)

5 years agoqa: adapt tests for empty pinned dir export
Patrick Donnelly [Fri, 19 Jun 2020 20:52:22 +0000 (13:52 -0700)]
qa: adapt tests for empty pinned dir export

Previously, empty pinned directories were not migrated.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 69e3f556a73f20ce099d3cf41fd839761ef5198b)

5 years agoqa: break export pin tests into discrete tests
Patrick Donnelly [Mon, 15 Jun 2020 16:40:55 +0000 (09:40 -0700)]
qa: break export pin tests into discrete tests

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 091e8ffd9dd174d47cf683f14abb2ec23581705e)