Skip to content

mgr/volumes/nfs: Check cluster exists before creating exports and fetch exports from export objects if mgr restarted#35417

Merged
batrick merged 24 commits intoceph:masterfrom
varshar16:wip-make-exports-persistent
Jul 1, 2020
Merged

mgr/volumes/nfs: Check cluster exists before creating exports and fetch exports from export objects if mgr restarted#35417
batrick merged 24 commits intoceph:masterfrom
varshar16:wip-make-exports-persistent

Conversation

@varshar16
Copy link
Contributor

@varshar16 varshar16 commented Jun 5, 2020

This patch series does the following changes:

  • Restrict cluster id to only [A-Za-z0-9-_.] characters
  • On restarting mgr, exports are fetched from export rados objects
  • Check cluster availability in export command methods
  • Add get export interface
  • Add ls export interface
  • Add nfs cluster ls interface
  • Add idempotency test for nfs commands and all the new changes

Fixes: https://tracker.ceph.com/issues/45740
Fixes: https://tracker.ceph.com/issues/45744
Fixes: https://tracker.ceph.com/issues/45741

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@varshar16
Copy link
Contributor Author

Testing with vstart requires this PR #35344

@varshar16 varshar16 force-pushed the wip-make-exports-persistent branch from c432e26 to 166bbcb Compare June 8, 2020 09:52
@varshar16
Copy link
Contributor Author

Fixed mypy errors.

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Jun 8, 2020
@sebastian-philipp
Copy link
Contributor

@sebastian-philipp sebastian-philipp removed the wip-swagner-testing My Teuthology tests label Jun 8, 2020
Copy link
Contributor

@ajarr ajarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally. Export persistence across ganesha restart and cluster check works

@varshar16 varshar16 force-pushed the wip-make-exports-persistent branch 3 times, most recently from a17f81f to 702cb79 Compare June 9, 2020 15:39
@varshar16
Copy link
Contributor Author

Added tests to check idempotency of nfs commands and export persistence on restarting mgr.

@varshar16
Copy link
Contributor Author

@sebastian-philipp
Copy link
Contributor

ack.

@jtlayton
Copy link
Contributor

Looks reasonable overall aside from the protocols and transport versions being converted to singletons from a list.

@varshar16 varshar16 force-pushed the wip-make-exports-persistent branch from 702cb79 to a657597 Compare June 11, 2020 16:41
@ajarr
Copy link
Contributor

ajarr commented Jun 14, 2020

@varshar16 please pick the following commits from #35414
6c9161a
f8711d2
8967a3c

the 3 commit were rebased on top of this work. I can then abandon #35414

varshar16 and others added 24 commits June 30, 2020 23:17
Signed-off-by: Varsha Rao <varao@redhat.com>
…ng mgr

Signed-off-by: Varsha Rao <varao@redhat.com>
... for ganesha cluster names.

Fixes: https://tracker.ceph.com/issues/45744
Signed-off-by: Ramana Raja <rraja@redhat.com>
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>
This commands provides list of deployed nfs clusters.

Fixes: https://tracker.ceph.com/issues/45742
Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
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>
Signed-off-by: Varsha Rao <varao@redhat.com>
To maintain consistency and improve readability.

Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
…dify list cluster

Signed-off-by: Varsha Rao <varao@redhat.com>
… and cluster id

Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
Signed-off-by: Varsha Rao <varao@redhat.com>
Instead we can do it if any export commands are used. This fixes ImportError
raised when FSExport is initialized with cephadm module disabled.

Signed-off-by: Varsha Rao <varao@redhat.com>
@varshar16 varshar16 force-pushed the wip-make-exports-persistent branch from fd9bceb to 4ebb258 Compare June 30, 2020 17:48
@batrick
Copy link
Member

batrick commented Jun 30, 2020

jenkins test make check

@batrick
Copy link
Member

batrick commented Jun 30, 2020

make check failure not caused by this PR

@batrick
Copy link
Member

batrick commented Jul 1, 2020

@batrick batrick merged commit 2555ed1 into ceph:master Jul 1, 2020
@varshar16 varshar16 deleted the wip-make-exports-persistent branch August 5, 2020 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants