Skip to content

mgr/cephadm: add NFS protocols setting - #37484

Closed
mgfritch wants to merge 2 commits into
ceph:masterfrom
mgfritch:cephadm-nfs-v3
Closed

mgfritch wants to merge 2 commits into
ceph:masterfrom
mgfritch:cephadm-nfs-v3

Conversation

@mgfritch

@mgfritch mgfritch commented Sep 30, 2020 •

Copy link
Copy Markdown
Contributor

allow for the NFS protocals to be defined via a ServiceSpec

$ cat nfs.yaml
service_type: nfs
service_id: foo
placement:
  count: 2
spec:
  namespace: foo
  pool: nfs-ganesha
  protocols: 
  - NFSv3
  - NFSv4

$ ceph orch apply -i nfs.yaml

Signed-off-by: Michael Fritch [email protected]

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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 api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@mgfritch
mgfritch requested a review from a team as a code owner September 30, 2020 02:35
@mgfritch

Copy link
Copy Markdown
Contributor Author

This is an artifact of the ganesha.conf used by the rook deployments where a k8s cluster does not have a running rpcbind / mountd service.

Many legacy deployments nautilus -> octopus will likely have this service as well as legacy NFSv3 clients that wish to access the ganesha cluster.

$ showmount -e localhost 
Export list for localhost:
/foo (everyone)

$ rpcinfo | grep nfs 
   100003    3    udp       0.0.0.0.8.1            nfs        superuser 
   100003    3    udp6      ::.8.1                 nfs        superuser 
   100003    3    tcp       0.0.0.0.8.1            nfs        superuser 
   100003    3    tcp6      ::.8.1                 nfs        superuser 
   100003    4    udp       0.0.0.0.8.1            nfs        superuser 
   100003    4    udp6      ::.8.1                 nfs        superuser 
   100003    4    tcp       0.0.0.0.8.1            nfs        superuser 
   100003    4    tcp6      ::.8.1                 nfs        superuser

$ mount -o vers=3 localhost:/foo m 
$ mount | grep nfs 
localhost:/foo on /mnt type nfs (rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,mountaddr=::1,mountvers=3,mountport=48844,mountproto=udp6,local_lock=none,addr=::1)

@mgfritch

Copy link
Copy Markdown
Contributor Author

We might also consider omitting the Protocols line from the NFS_CORE_PARAM block, but that would require all hosts have a running rpcbind service ...

@bk201

bk201 commented Sep 30, 2020

Copy link
Copy Markdown
Contributor

Improvement for the Dashboard can be made after this change:

  • Disable the checkbox for unsupported protocol.
  • Show a tooltip that rpcbind service is required on the host in order to access v3 exports.

@LenzGr

LenzGr commented Sep 30, 2020

Copy link
Copy Markdown
Contributor

Improvement for the Dashboard can be made after this change:

* Disable the checkbox for unsupported protocol.
* Show a tooltip that rpcbind service is required on the host in order to access v3 exports.

Would you mind filing tracker issues for these, so they don't get lost? Thanks!

@LenzGr

LenzGr commented Sep 30, 2020

Copy link
Copy Markdown
Contributor

nit: s/protocals/protocols/ in the git commit message (and the PR description)

@batrick batrick added kcephfs nfs cephfs Ceph File System and removed kcephfs labels Oct 1, 2020
@jtlayton

jtlayton commented Oct 1, 2020

Copy link
Copy Markdown
Contributor

Ok, so you want to allow NFSv3? Why? Are you dealing with really old legacy clients? Note that even RHEL5 (with a 2.6.17-based kernel) was able to support v4.1. While it's pretty trivial to allow ganesha to accept NFSv3 RPCs, that opens a whole host of other issues that you probably ought to consider:

As @mgfritch pointed out above, you also need a functioning rpcbind service (or to tell the client what ports to talk to for mountd, NLM, NSM, etc.). Those ports will also need to be exposed to the clients (may or may not be trivial, depending on orch type).

If you're enabling locking too, then you probably ought to consider how this is going to work in a clustered configuration. NSM is a deeply flawed protocol that makes this difficult. You may just want to prevent multi-head ganesha deployments altogether when it's enabled. Stateful protocols like NLM are the "hard part".

IOW, unless you have a really good reason to support NFSv3, it's really best avoided.

@LenzGr

LenzGr commented Oct 1, 2020

Copy link
Copy Markdown
Contributor

IOW, unless you have a really good reason to support NFSv3, it's really best avoided.

Thanks a lot for your feedback, @jtlayton - much appreciated. This issue bubbled up as a potential regression from Nautilus to Octopus (RPM- vs. container-based deployments). Currently, Ceph Dashboard includes support for both NFSv3 and v4. We did not realize that NFSv3 support was also not implemented in the volumes/nfs module, otherwise we could have looked into removing it or at announcing its deprecation. While Linux clients are likely not a problem, I wonder if there are still legacy applications out there that don't support NFSv4?

@jtlayton jtlayton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While Linux clients are likely not a problem, I wonder if there are still legacy applications out there that don't support NFSv4?

Not so much applications as legacy clients. Sure, there are still legacy unixes in the field (HPUX, AIX, Solaris, etc). I think Solaris has a working v4.1+ client, but the others...not so much. MS-Windows also has a v3 client, IIRC, but not a v4 one. For that though, you'll probably be better off using SMB anyway.

We can contrive use-cases all day for v3 support, but without someone specifically saying they need it (and why), I think we'll all be better off not opening this can of worms.

@mgfritch

mgfritch commented Oct 5, 2020 •

Copy link
Copy Markdown
Contributor Author

added a few tests and input validation.

this also now uses a list type for the protocols:

service_type: nfs
service_id: foo
placement:
  count: 1
spec:
  namespace: foo
  pool: nfs-ganesha
  protocols:
  - NFSv4
  - NFSv3

@mgfritch

mgfritch commented Oct 5, 2020

Copy link
Copy Markdown
Contributor Author

IOW, unless you have a really good reason to support NFSv3, it's really best avoided.

agree with @jtlayton, while this PR exposes the legacy protocols, we probably should discourage their use

@bk201 bk201 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! Thanks!

I accidentally misuse the YAML example in the PR description to test validation:

    protocols: hey

And it was treated as a list of string:

Error EINVAL: Unknown protocols: {'e', 'y', 'h'}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Print a message to use v4 instead and deprecation warning for legacy protocols.

@sebastian-philipp sebastian-philipp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

needs a docs change as well

@sebastian-philipp

Copy link
Copy Markdown
Contributor

you want to resurrect this PR?

@sebastian-philipp sebastian-philipp mentioned this pull request Mar 8, 2021
3 tasks
mgfritch added 2 commits March 9, 2021 09:00
allow for the NFS protocols to be defined via a ServiceSpec

Signed-off-by: Michael Fritch <[email protected]>
and caution about NFSv3 deprecation

Signed-off-by: Michael Fritch <[email protected]>
@mgfritch

Copy link
Copy Markdown
Contributor Author

rook and cephadm deprecate support for NFSv3 (#40008)

@mgfritch mgfritch closed this Mar 10, 2021
@mgfritch
mgfritch deleted the cephadm-nfs-v3 branch March 10, 2021 20:20
@votdev votdev mentioned this pull request Apr 29, 2021
1 of 3 tasks
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.

8 participants