Skip to content

mgr/nfs: add NFSv3 protocol to default protocols - #55693

Merged
adk3798 merged 4 commits into
ceph:mainfrom
adk3798:cephadm-nfsv3
Oct 30, 2024
Merged

adk3798 merged 4 commits into
ceph:mainfrom
adk3798:cephadm-nfsv3

Conversation

@adk3798

@adk3798 adk3798 commented Feb 21, 2024

Copy link
Copy Markdown
Contributor

To allow users to use NFSv3 with cephadm deployed
nfs daemons and nfs module created exports

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
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 cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@adk3798
adk3798 requested a review from a team as a code owner February 21, 2024 16:03
@github-actions github-actions Bot added the nfs label Feb 21, 2024
@adk3798

adk3798 commented Feb 21, 2024

Copy link
Copy Markdown
Contributor Author

with all 3 commits here, mounting with NFSv3 seems to work

[root@vm-00 ~]# mount -t nfs -o vers=3 -o port=2049 192.168.122.75:/export_foo /mnt/foo
[root@vm-00 ~]# 
[root@vm-00 ~]# echo "hello" > /mnt/foo/test.txt
[root@vm-00 ~]# 
[root@vm-00 ~]# cat /mnt/foo/test.txt 
hello
[root@vm-00 ~]# 
[root@vm-00 ~]# ssh vm-01
The authenticity of host 'vm-01 (fefe:fefe:fefe:ff00::139)' can't be established.
ED25519 key fingerprint is SHA256:7eKAX0q1Woqvy4vX2tDB5yyyRhy0irgiIoCJs3pGVYc.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:1: 192.168.122.79
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'vm-01' (ED25519) to the list of known hosts.
Activate the web console with: systemctl enable --now cockpit.socket

[root@vm-01 ~]# 
[root@vm-01 ~]# mkdir -p /mnt/foo
[root@vm-01 ~]# 
[root@vm-01 ~]# mount -t nfs -o vers=3 -o port=2049 192.168.122.75:/export_foo /mnt/foo
[root@vm-01 ~]# 
[root@vm-01 ~]# cat /mnt/foo/test.txt 
hello
[root@vm-01 ~]# 

Note that without the mount_path_pseudo = true; patch but still with the other two, this still fails with ganesha.nfsd-2[svc_12] mnt_Mnt :NFS3 :INFO :MOUNT: Export entry / does not support NFS v3 for client ::ffff:192.168.122.75

@mgfritch mgfritch 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.

Are we sure NFSv3 is needed?

Support for this protocol was removed (for both rook and cephadm deployments) when we containerized the nfs-ganesha service (ceph >= octopus)

There was quite a bit of discussion about re-adding this protocol:
#37484 (comment)

But it was eventually marked as deprecated/disabled in various places:
#40008
#41081

@adk3798

adk3798 commented Feb 21, 2024

Copy link
Copy Markdown
Contributor Author

Are we sure NFSv3 is needed?

Support for this protocol was removed (for both rook and cephadm deployments) when we containerized the nfs-ganesha service (ceph >= octopus)

There was quite a bit of discussion about re-adding this protocol: #37484 (comment)

But it was eventually marked as deprecated/disabled in various places: #40008 #41081

Are we sure NFSv3 is needed?

Support for this protocol was removed (for both rook and cephadm deployments) when we containerized the nfs-ganesha service (ceph >= octopus)

There was quite a bit of discussion about re-adding this protocol: #37484 (comment)

But it was eventually marked as deprecated/disabled in various places: #40008 #41081

for context, this was coming from downstream, i believe so that some Windows client could mount the export using NFSv3. I wouldn't actually expect people to use NFSv3 over NFSv4 for the most part. But, I'm willing to mention those problems discussed in the comment you linked or maybe lock this behind some flag rather than having it by default (and not documenting it). The idea was just to make it possible for those certain clients without them needing to manually update the ganesha conf and export to have NFSv3 listed as a protocol.

@adk3798

adk3798 commented Feb 28, 2024

Copy link
Copy Markdown
Contributor Author

If we were to go for this, test failure

2024-02-27T06:26:42.790 INFO:tasks.cephfs_test_runner:FAIL: test_create_and_delete_export (tasks.cephfs.test_nfs.TestNFS)
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:Test successful creation and deletion of the cephfs export.
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:----------------------------------------------------------------------
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:Traceback (most recent call last):
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_635ee6850c57c98cc6ba932cade45f9cc015aa32/qa/tasks/cephfs/test_nfs.py", line 449, in test_create_and_delete_export
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:    self._test_get_export()
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:  File "/home/teuthworker/src/git.ceph.com_ceph-c_635ee6850c57c98cc6ba932cade45f9cc015aa32/qa/tasks/cephfs/test_nfs.py", line 285, in _test_get_export
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:    self.assertDictEqual(self.sample_export, nfs_output)
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:AssertionError: {'export_id': 1, 'path': '/', 'cluster_id':[219 chars]: []} != {'access_type': 'RW', 'clients': [], 'clust[251 chars]CP']}
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:  {'access_type': 'RW',
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:   'clients': [],
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:   'cluster_id': 'test',
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:   'export_id': 1,
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:-  'fsal': {'fs_name': 'nfs-cephfs', 'name': 'CEPH', 'user_id': 'nfs.test.1'},
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:+  'fsal': {'cmount_path': '/',
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:+           'fs_name': 'nfs-cephfs',
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:+           'name': 'CEPH',
2024-02-27T06:26:42.791 INFO:tasks.cephfs_test_runner:+           'user_id': 'nfs.test.nfs-cephfs'},
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:   'path': '/',
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:-  'protocols': [4],
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:+  'protocols': [3, 4],
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:?                +++
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:   'pseudo': '/cephfs',
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:   'security_label': True,
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:   'squash': 'none',
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:   'transports': ['TCP']}
2024-02-27T06:26:42.792 INFO:tasks.cephfs_test_runner:

only the protocols difference is actually from this PR, the rest is form another one in the run, but that would have to be fixed if this was to be merged.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions Bot closed this May 28, 2024
@adk3798 adk3798 reopened this Aug 27, 2024
@adk3798

adk3798 commented Aug 27, 2024

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@adk3798

adk3798 commented Sep 9, 2024

Copy link
Copy Markdown
Contributor Author

https://pulpito.ceph.com/adking-2024-09-05_04:20:41-orch:cephadm-wip-adk-testing-2024-09-04-1621-distro-default-smithi/

Failures:

  • two instances of https://tracker.ceph.com/issues/67758, known issue
  • 1 failure staggered upgrade with agent, known issue
  • Test failure: test_nfs_export_creation_without_cmount_path (tasks.cephfs.test_nfs.TestNFS) caused by a PR in the run
  • a couple SMB tests failing with either in cluster log stray daemon warnings or SELinux denials, known issue
  • deploy raw OSD test timing out, known issue
  • mds_upgrade_sequence and rgw-ingress tests timing out, known issue

Nothing to block merging the PRs in the run other than the NFS failure related one

@adk3798

adk3798 commented Sep 9, 2024

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@adk3798

adk3798 commented Sep 10, 2024

Copy link
Copy Markdown
Contributor Author

https://pulpito.ceph.com/adking-2024-09-10_02:59:23-orch:cephadm-wip-adk-testing-2024-09-09-1904-distro-default-smithi/

Failures:

  • stray daemon warning in smb test, known issue
  • Test failure: test_nfs_export_creation_without_cmount_path (tasks.cephfs.test_nfs.TestNFS) caused by a PR in the run
  • 2x agent on staggered upgrade failure, known issue
  • deploy raw test timed out, known issue
  • test_rgw_multisite test failed to generate token on realm bootstrap, somewhat new but not the first time I've seen it and it's unrelated to PRs in this run
  • 4x mds_upgrade_sequence failures, known issue
  • rgw-ingress tests timed out, known issue

Nothing to block merging PRs in the run other than the NFS failure related one

@phlogistonjohn phlogistonjohn 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.

I don't love the use case, but I get that it is important for some client types. Code changes seem OK to me.

@adk3798

adk3798 commented Oct 16, 2024

Copy link
Copy Markdown
Contributor Author

https://pulpito.ceph.com/phlogistonjohn-2024-10-15_13:29:56-orch:cephadm-wip-adk-testing-2024-10-14-1530-distro-default-smithi/

Failures:

  • 3x failures in smb ctdb tests due to either stray daemon warnings or selinux denials, known issue
  • 3x misc. infra/teuthology failures
  • 3x mds_upgrade sequence timeouts or cluster log warnings, known issue
  • 2x rgw ingress test timeouts, known issue
  • mgr-nfs-upgrade failure, looks like it tried to check all the daemons were upgraded while only the first mgr had been upgraded. It looks like maybe something went wrong with the check to make sure the upgrade had completed.

Would maybe hold off on merging upgrade related PRs, but everything else should be okay.

@adk3798

adk3798 commented Oct 16, 2024

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

To allow users to use NFSv3 by default with
exports created through the nfs module

Signed-off-by: Adam King <[email protected]>
To allow users to use NFSv3 with cephadm deployed
nfs daemons by default

Signed-off-by: Adam King <[email protected]>
This seems to be necessary in order to mount exports
wit NFSv3, evne with protocol 3 present in the ganesha
conf and the export

Signed-off-by: Adam King <[email protected]>
The UDP protocol must be disabled in order for NFSv3 to work

Signed-off-by: Adam King <[email protected]>
@adk3798

adk3798 commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

https://pulpito.ceph.com/adking-2024-10-22_07:55:35-orch:cephadm-wip-adk-testing-2024-10-21-1626-distro-default-smithi/

Failures:

  • 2x smb stdb test SELinux denials / stray daemon warnings, known issue
  • 3x mds_upgrade_sequence in cluster log / timeout issues, known issue
  • 2x rgw-ingress timeout failures, known issue

Nothing to block merging

@adk3798

adk3798 commented Oct 30, 2024

Copy link
Copy Markdown
Contributor Author

https://pulpito.ceph.com/adking-2024-10-30_03:37:52-orch:cephadm-wip-adk-testing-2024-10-29-1832-distro-default-smithi/

Failures:

  • 3x SMB ctdb test stray daemon / SELinux denial, known issue
  • 2x failures on new tests for mgmt-gateway, caused by PR adding those new tests
  • 3x mds_upgrade_sequence failures, known issue
  • 1x staggered upgrade with agent failure, known issue

Dead Jobs:

  • 1x Error reimaging machines, infra/teuthology issue
  • 1x rgw-ingress test timeout, known issue
  • 1x test_iscsi_container timeout. I've seen this before but thought it had been fixed. Will need to investigate.

Results should only block merging for PRs related to iscsi or mgmt-gateqay/oauth2-proxy. Otherwise, run was okay.

@adk3798
adk3798 merged commit 81e274b into ceph:main Oct 30, 2024
@xin053

xin053 commented Nov 25, 2025

Copy link
Copy Markdown

@adk3798
I upgrade ceph from squid to tentacle,notice that nfs server is failed with docker log:

Nov 25 11:20:46 ctl1 systemd[1]: Started Ceph nfs.cephfs.0.3.ctl1.bzgkug for 4614d022-1e84-11f0-b1cd-b796f21ce38f.
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] init_logging :LOG :NULL :LOG: Setting log level for all components to NIV_EVENT
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] main :MAIN :EVENT :ganesha.nfsd Starting: Ganesha Version 5.9
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] SetComponentLogLevel :LOG :NULL :LOG: Changing log level of COMPONENT_NFS_V4 from NIV_EVENT to NIV_FULL_DEBUG
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] nfs_set_param_from_conf :NFS STARTUP :EVENT :Configuration file successfully parsed
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] monitoring_init :NFS STARTUP :EVENT :Init monitoring at 0.0.0.0:9587
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] fsal_init_fds_limit :MDCACHE LRU :EVENT :Setting the system-imposed limit on FDs to 1048576.
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] init_server_pkgs :NFS STARTUP :EVENT :Initializing ID Mapper.
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] init_server_pkgs :NFS STARTUP :EVENT :ID Mapper successfully initialized.
Nov 25 11:20:47 ctl1 bash[3625673]: 25/11/2025 03:20:47 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] nfs_start_grace :STATE :EVENT :NFS Server Now IN GRACE, duration 90
Nov 25 11:20:53 ctl1 bash[3625673]: 25/11/2025 03:20:53 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] nfs_start_grace :STATE :EVENT :grace reload client info completed from backend
Nov 25 11:20:53 ctl1 bash[3625673]: 25/11/2025 03:20:53 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] nfs_try_lift_grace :STATE :EVENT :check grace:reclaim complete(0) clid count(0)
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] nfs_lift_grace_locked :STATE :EVENT :NFS Server Now NOT IN GRACE
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] config_errs_to_log :CONFIG :WARN :Config File (/etc/ganesha/ganesha.conf:15): Unknown parameter (allow_set_io_flusher_fail)
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] config_errs_to_log :CONFIG :WARN :Config File (/etc/ganesha/ganesha.conf:34): Unknown block (RADOS_URLS)
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] config_errs_to_log :CONFIG :WARN :Config File (/etc/ganesha/ganesha.conf:39): Unknown block (RGW)
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] lower_my_caps :NFS STARTUP :EVENT :CAP_SYS_RESOURCE was successfully removed for proper quota management in FSAL
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] lower_my_caps :NFS STARTUP :EVENT :currently set capabilities are: cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap=ep
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] gsh_dbus_pkginit :DBUS :CRIT :dbus_bus_get failed (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] gsh_dbus_register_path :DBUS :CRIT :dbus_connection_register_object_path called with no DBUS connection
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] gsh_dbus_register_path :DBUS :CRIT :dbus_connection_register_object_path called with no DBUS connection
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] gsh_dbus_register_path :DBUS :CRIT :dbus_connection_register_object_path called with no DBUS connection
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] nfs_Init_svc :DISP :CRIT :Cannot acquire credentials for principal nfs
Nov 25 11:20:59 ctl1 bash[3625673]: 25/11/2025 03:20:59 : epoch 6925208f : ctl1 : ganesha.nfsd-7[main] __Register_program :DISP :MAJ :Cannot register NFS V3 on TCP
Nov 25 11:20:59 ctl1 systemd[1]: ceph-4614d022-1e84-11f0-b1cd-b796f21ce38f@nfs.cephfs.0.3.ctl1.bzgkug.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 25 11:20:59 ctl1 systemd[1]: ceph-4614d022-1e84-11f0-b1cd-b796f21ce38f@nfs.cephfs.0.3.ctl1.bzgkug.service: Failed with result 'exit-code'.
Nov 25 11:21:09 ctl1 systemd[1]: ceph-4614d022-1e84-11f0-b1cd-b796f21ce38f@nfs.cephfs.0.3.ctl1.bzgkug.service: Scheduled restart job, restart counter is at 2.
Nov 25 11:21:09 ctl1 systemd[1]: Stopped Ceph nfs.cephfs.0.3.ctl1.bzgkug for 4614d022-1e84-11f0-b1cd-b796f21ce38f.

but when I change Protocols from Protocols = 3, 4; to Protocols = 4;, it work fine;Is there something wrong?

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.

4 participants