Skip to content

mgr/cephadm: Updated NFS default protocol to v4 and v3 is enabled only when enable_nfsv3 is set in the spec - #67025

Merged
rkachach merged 4 commits into
ceph:mainfrom
ShwetaBhosale1:fix_issue_74492_set_nfs_default_protocol_as_4
Jul 6, 2026
Merged

rkachach merged 4 commits into
ceph:mainfrom
ShwetaBhosale1:fix_issue_74492_set_nfs_default_protocol_as_4

Conversation

@ShwetaBhosale1

@ShwetaBhosale1 ShwetaBhosale1 commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

This PR updates the default NFS protocol to v4. Support for NFS v3 is now disabled by default and will be enabled only when the enable_nfsv3 field is explicitly set in the spec.
And updated 'nfs cluster create' command to accept enable_nfsv3 :
nfs cluster create <cluster_id> [] [--ingress] [--virtual_ip ] [--ingress_mode {default|keepalive-only|haproxy-standard|haproxy-protocol}] [--port ] [--enable-nfsv3]

Fixes: https://tracker.ceph.com/issues/74492
Signed-off-by: Shweta Bhosale [email protected]

Testing logs:

  1. with default value
[ceph: root@ceph-node-0 /]# ceph orch ls nfs --export --format yaml
service_type: nfs
service_id: test
service_name: nfs.test
placement:
  host_pattern: '*'
spec:
  port: 2049
[ceph: root@ceph-node-0 /]# 

[ceph: root@ceph-node-0 /]# ceph orch ls nfs --export --format yaml
service_type: nfs
service_id: test
service_name: nfs.test
placement:
  host_pattern: '*'
spec:
  port: 2049
[ceph: root@ceph-node-0 /]# 
  1. with enable_nfsv3 spec field
[ceph: root@ceph-node-0 /]# ceph orch ls nfs --export --format yaml    
service_type: nfs
service_id: test
service_name: nfs.test
placement:
  host_pattern: '*'
spec:
  enable_nfsv3: true
  port: 2049
[ceph: root@ceph-node-0 /]# 

[ceph: root@ceph-node-0 /]# ceph orch ls nfs --export --format yaml    
service_type: nfs
service_id: test
service_name: nfs.test
placement:
  host_pattern: '*'
spec:
  enable_nfsv3: true
  port: 2049
[ceph: root@ceph-node-0 /]# 

  1. using nfs cluster create command
[ceph: root@ceph-node-0 /]# ceph nfs cluster create test '*'

NFS_CORE_PARAM {
        Enable_NLM = false;
        Enable_RQUOTA = false;
        Protocols = 4;
        mount_path_pseudo = true;
        Enable_UDP = false;
        NFS_Port = 2049;
        allow_set_io_flusher_fail = true;
        Monitoring_Port = 9587;
}


[ceph: root@ceph-node-0 /]# ceph nfs cluster create test '*' --enable-nfsv3
[ceph: root@ceph-node-0 /]#

NFS_CORE_PARAM {
        Enable_NLM = false;
        Enable_RQUOTA = false;
        Protocols = 3, 4;
        mount_path_pseudo = true;
        Enable_UDP = false;
        NFS_Port = 2049;
        allow_set_io_flusher_fail = true;
        Monitoring_Port = 9587;
}

Export testing logs:

[ceph: root@ceph-node-0 /]# ceph nfs cluster create test1 '*' --enable-nfsv3
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# ceph nfs export create cephfs test1 /export1 myfs
{
  "bind": "/export1",
  "cluster": "test1",
  "fs": "myfs",
  "mode": "RW",
  "path": "/"
}
[ceph: root@ceph-node-0 /]# ceph nfs export info test1 /export1
{
  "access_type": "RW",
  "clients": [],
  "cluster_id": "test1",
  "export_id": 1,
  "fsal": {
    "cmount_path": "/",
    "fs_name": "myfs",
    "name": "CEPH",
    "user_id": "nfs.test1.myfs.9cc40334"
  },
  "path": "/",
  "protocols": [
    3,
    4
  ],
  "pseudo": "/export1",
  "security_label": true,
  "squash": "none",
  "transports": [
    "TCP"
  ]
}
[ceph: root@ceph-node-0 /]# 

[ceph: root@ceph-node-0 /]# ceph nfs cluster create test '*'
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# ceph fs volume create myfs '*'
[ceph: root@ceph-node-0 /]# ceph nfs export create cephfs test /export1 myfs
{
  "bind": "/export1",
  "cluster": "test",
  "fs": "myfs",
  "mode": "RW",
  "path": "/"
}
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# ceph nfs export info test /export1     
{
  "access_type": "RW",
  "clients": [],
  "cluster_id": "test",
  "export_id": 1,
  "fsal": {
    "cmount_path": "/",
    "fs_name": "myfs",
    "name": "CEPH",
    "user_id": "nfs.test.myfs.23f0f81e"
  },
  "path": "/",
  "protocols": [
    4
  ],
  "pseudo": "/export1",
  "security_label": true,
  "squash": "none",
  "transports": [
    "TCP"
  ]
}
[ceph: root@ceph-node-0 /]#

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ShwetaBhosale1
ShwetaBhosale1 marked this pull request as ready for review January 21, 2026 15:51
@ShwetaBhosale1
ShwetaBhosale1 requested a review from a team as a code owner January 21, 2026 15:51

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

What's here LGTM. We probably also want to add docs for this and some flag to set this in ceph nfs cluster create... but for the cephadm module and spec changes this looks good

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_74492_set_nfs_default_protocol_as_4 branch from bf0a9bb to 7f85f90 Compare January 21, 2026 16:25
@ShwetaBhosale1
ShwetaBhosale1 requested a review from a team as a code owner January 21, 2026 16:25
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_74492_set_nfs_default_protocol_as_4 branch from 7f85f90 to d8f2e45 Compare January 21, 2026 16:27

@anthonyeleven anthonyeleven 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 am not qualified to review the code, but I approve of the intent.

@rkachach rkachach 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

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_74492_set_nfs_default_protocol_as_4 branch from e6a378a to 6e6e599 Compare February 6, 2026 13:30
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_74492_set_nfs_default_protocol_as_4 branch from acd976b to f4a70f1 Compare April 30, 2026 13:47

@mnaser mnaser left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs either a compatibility fix or explicit upgrade documentation because it can introduce a regression for clusters already using NFSv3 from the current v20/Tentacle behavior.

PR #55693 changed cephadm-generated Ganesha config to include Protocols = 3, 4 by default, and that behavior is present in the v20.x tags. Existing NFS service specs from those versions will not have an enable_nfsv3 field set, but the deployed service may still be serving NFSv3 clients today.

With this PR, the default becomes enable_nfsv3: false, so an existing service without the new field appears to render as Protocols = 4 after redeploy/upgrade. That would silently drop NFSv3 for users who started relying on the behavior added in #55693.

Please either add a migration/compatibility path for existing NFS services that were created while NFSv3 was enabled by default, or document an explicit upgrade action required for users who need to preserve NFSv3.

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

This needs either a compatibility fix or explicit upgrade documentation because it can introduce a regression for clusters already using NFSv3 from the current v20/Tentacle behavior.

PR #55693 changed cephadm-generated Ganesha config to include Protocols = 3, 4 by default, and that behavior is present in the v20.x tags. Existing NFS service specs from those versions will not have an enable_nfsv3 field set, but the deployed service may still be serving NFSv3 clients today.

With this PR, the default becomes enable_nfsv3: false, so an existing service without the new field appears to render as Protocols = 4 after redeploy/upgrade. That would silently drop NFSv3 for users who started relying on the behavior added in #55693.

Please either add a migration/compatibility path for existing NFS services that were created while NFSv3 was enabled by default, or document an explicit upgrade action required for users who need to preserve NFSv3.

@mnaser Thanks for pointing it out! We’ve decided to document it in the release notes.

@rkachach

rkachach commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@rkachach
rkachach merged commit 9d5142e into ceph:main Jul 6, 2026
6 checks passed
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/28785121176

@vshankar

Copy link
Copy Markdown
Contributor

Teuthology run was successful. Failing Test cases are not related to this PR: https://pulpito.ceph.com/rkachach-2026-07-03_14:23:53-orch:cephadm-wip-rkachach-testing-2026-07-03-1453-distro-default-trial/

@rkachach @ShwetaBhosale1 - this change is causing failures in fs suite (fs:nfs). See https://pulpito.ceph.com/vshankar-2026-07-10_05:20:58-fs-wip-vshankar-testing-20260709.140056-distro-default-trial/352500/

The above teuthology run does not include orch:cephadm:nfs (which is a symlink to qa/suites/fs/nfs/) sub-suite for some reason.

@ShwetaBhosale1

ShwetaBhosale1 commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor Author

@rkachach @ShwetaBhosale1 - this change is causing failures in fs suite (fs:nfs). See https://pulpito.ceph.com/vshankar-2026-07-10_05:20:58-fs-wip-vshankar-testing-20260709.140056-distro-default-trial/352500/
The above teuthology run does not include orch:cephadm:nfs (which is a symlink to qa/suites/fs/nfs/) sub-suite for some reason.

@vshankar The PR to fix the test case has already been merged: #70084. Does your run include the changes from this PR?

@vshankar

Copy link
Copy Markdown
Contributor

@vshankar The PR to fix the test case has already been merged: #70084. Does your run include the changes from this PR?

Thanks for the link to the PR that fixes the issue. It's likely that this additional fix was not a part of the branch when I created it.

Do we know why orch:cephadm:nfs test jobs didn't get scheduled in @rkachach run?

@rkachach

Copy link
Copy Markdown
Contributor

@vshankar The PR to fix the test case has already been merged: #70084. Does your run include the changes from this PR?

Thanks for the link to the PR that fixes the issue. It's likely that this additional fix was not a part of the branch when I created it.

Do we know why orch:cephadm:nfs test jobs didn't get scheduled in @rkachach run?

@vshankar I'm afraid I can't answer this question as I don't know how Teuthology internals work..

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.

6 participants