Skip to content

mgr/nfs: NFS cluster and export commands to enable and disable ops control - #61826

Merged
rkachach merged 19 commits into
ceph:mainfrom
ShwetaBhosale1:fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting
Apr 30, 2026
Merged

rkachach merged 19 commits into
ceph:mainfrom
ShwetaBhosale1:fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting

Conversation

@ShwetaBhosale1

@ShwetaBhosale1 ShwetaBhosale1 commented Feb 14, 2025 •

Copy link
Copy Markdown
Contributor

mgr/nfs: NFS cluster and export commands to enable and disable ops/s control

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

For bandwidth control description, check #61283

Cluster commands:

  1. nfs cluster qos enable ops_control <cluster_id> <qos_type:PerShare|PerClient|PerShare_PerClient> [<max_export_iops:int>] [<max_client_iops:int>]
  2. nfs cluster qos disable ops_control <cluster_id>

For enable command:
a. If qos_type is pershare, then max_export_iops is compulsory
b. If qos_type is perclient, then max_client_iops is compulsory
c. If qos_type is pershare_perclient then both max_export_iops and max_client_iops are compulsory parameters

Export commands:

  1. nfs export qos enable ops_control <cluster_id> <pseudo_path> [<max_export_iops:int>] [<max_client_iops:int>]
  2. nfs export qos disable ops_control <cluster_id> <pseudo_path>

For enable command:
a. If qos_type is pershare, then max_export_iops is compulsory
b. If qos_type is perclient, then ops control enable is not allowed at export level.
c. If qos_type is pershare_perclient then both max_export_iops and max_client_iops are compulsory parameters

Qos_type is the common parameter of both bandwidths and ops control the command. So if it is set, then the enable command will fail if different qos_type is passed.

Testing logs:

[ceph: root@ceph-node-0 /]# ceph nfs cluster qos get mynfs
{}
[ceph: root@ceph-node-0 /]#
[ceph: root@ceph-node-0 /]# ceph nfs cluster qos enable bandwidth_control mynfs PerShare --max_export_write_bw 10MB --max_export_read_bw 20MB
[ceph: root@ceph-node-0 /]# ceph nfs cluster qos enable ops_control mynfs PerClient
Error EINVAL: Bandwidth control is using PerShare qos type, please update that qos type for Bandwidth first.
[ceph: root@ceph-node-0 /]# ceph nfs cluster qos enable ops_control mynfs PerShare --max_export_iops 10000
[ceph: root@ceph-node-0 /]# ceph nfs cluster qos get mynfs
{
  "combined_rw_bw_control": false,
  "enable_bw_control": true,
  "enable_ops_control": true,
  "enable_qos": true,
  "max_export_iops": 10000,
  "max_export_read_bw": "20.0MB",
  "max_export_write_bw": "10.0MB",
  "qos_type": "PerShare"
}
[ceph: root@ceph-node-0 /]# 


[ceph: root@ceph-node-0 /]# ceph nfs export qos get mynfs /export1
{}
[ceph: root@ceph-node-0 /]# ceph nfs export qos enable ops_control mynfs /export1 --max_export_iops 20000
[ceph: root@ceph-node-0 /]# ceph nfs export qos get mynfs /export1
{
  "enable_ops_control": true,
  "enable_qos": true,
  "max_export_iops": 20000
}
[ceph: root@ceph-node-0 /]# 

[ceph: root@ceph-node-0 /]# ceph nfs cluster qos disable ops_control mynfs                                  
[ceph: root@ceph-node-0 /]# ceph nfs export qos enable ops_control mynfs /export1 --max_export_iops 20000
Error EINVAL: To configure IOPS control for export, you must first enable IOPS control at the cluster level mynfs.
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# ceph nfs cluster qos enable ops_control mynfs PerShare --max_export_iops 10000
[ceph: root@ceph-node-0 /]# ceph nfs export qos enable bandwidth_control mynfs /export1  --max_export_write_bw 10MB --max_export_read_bw 20MB
[ceph: root@ceph-node-0 /]# ceph nfs export qos get mynfs /export1
{
  "combined_rw_bw_control": false,
  "enable_bw_control": true,
  "enable_ops_control": true,
  "enable_qos": true,
  "max_export_iops": 20000,
  "max_export_read_bw": "20.0MB",
  "max_export_write_bw": "10.0MB"
}
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# cat export2.json 
{
  "access_type": "RW",
  "clients": [],
  "cluster_id": "mynfs",
  "export_id": 2,
  "fsal": {
    "cmount_path": "/",
    "fs_name": "myfs",
    "name": "CEPH",
    "user_id": "nfs.mynfs.myfs.126d1904"
  },
  "path": "/",
  "protocols": [
    3,
    4
  ],
  "pseudo": "/export2",
  "security_label": true,
  "squash": "none",
  "transports": [
    "TCP"
  ],
  "qos_block": {
    "combined_rw_bw_control": false,
    "enable_bw_control": true,
    "enable_ops_control": true,
    "enable_qos": true,
    "max_export_iops": 30000,
    "max_export_read_bw": "30.0MB",
    "max_export_write_bw": "30.0MB"
  }
}
[ceph: root@ceph-node-0 /]# ceph nfs export apply mynfs -i export2.json 
[
  {
    "pseudo": "/export2",
    "state": "updated"
  }
]
[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
  • 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

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ShwetaBhosale1 ShwetaBhosale1 changed the title mgr/nfs: NFS cluster and export commands to enable and disable ops/s control mgr/nfs: NFS cluster and export commands to enable and disable ops control Feb 17, 2025
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch from 9ea874b to 5069d83 Compare February 18, 2025 13:25
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test api

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch from 61ce1b7 to c9f2845 Compare March 10, 2025 08:12
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test signed

@adk3798

adk3798 commented Mar 12, 2025

Copy link
Copy Markdown
Contributor

@ShwetaBhosale1 the signed-off-by check is failing because you're missing a signed-off-by line on the commit to return the size in bytes for the dashboard

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch 3 times, most recently from 8fcf945 to 367d39a Compare March 15, 2025 12:53
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test api

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch from 5352814 to 6fff3a7 Compare March 19, 2025 05:59
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test api

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@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

Copy link
Copy Markdown
Contributor Author

Resolved conflicts of src/pybind/mgr/nfs/module.py file.

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch from 0cd4b23 to 78d5f45 Compare March 25, 2025 08:22
@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_69861_NFS_commands_to_enable_disable_ops_limiting branch from 2cf9310 to 5fc0913 Compare April 27, 2026 11:45
…parameters, then allow nfs export apply command if file has same qos block which is already set

fixes: https://tracker.ceph.com/issues/69458
Signed-off-by: Shweta Bhosale <[email protected]>
Added below CEPH_NODES_LIST block in ganesha.conf and enable_cluster_qos in cluster level QoS block
CEPH_NODES_LIST {
        Ceph_Nodes = 192.168.100.100, 192.168.100.101, 192.168.100.102;
}

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

mgr/cephadm: Changes to add NFS cluster qos inter node communication port in spec

mgr/nfs: Addressed review comments for cluster level qos support

mgr/nfs: add enable_cluster_qos = true while enabling qos
…, it will be enabled by default

2. Removed the cluster_enable_qos field from the cluster-level block as it was causing confusion for the user.
3. Instead of using cluster use global while showing cluster level qos values in export qos get

Fixes: https://tracker.ceph.com/issues/69861
Signed-off-by: Shweta Bhosale <[email protected]>
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch from 5fc0913 to b8d1bea Compare April 27, 2026 13:00
@rkachach rkachach added the wip-rkachach-testing-2 rkachach testing label Apr 27, 2026
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_69861_NFS_commands_to_enable_disable_ops_limiting branch from b8d1bea to 55ed85e Compare April 27, 2026 14:11
@rkachach

Copy link
Copy Markdown
Contributor

@rkachach
rkachach merged commit 020789f into ceph:main Apr 30, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

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

I found one or more Fixes: tags in the commit messages in

git log 020789f18bcdb12188ac0772bf1b30359d59c360^..020789f18bcdb12188ac0772bf1b30359d59c360

The referenced tickets are:

Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them.

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

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