Skip to content

mgr/cephadm: Update service name as userId for nfs cluster, to keep it same across nfs cluster - #64317

Merged
adk3798 merged 1 commit into
ceph:mainfrom
ShwetaBhosale1:fix_issue_71872_fix_nfs_userid_issue
Aug 19, 2026
Merged

adk3798 merged 1 commit into
ceph:mainfrom
ShwetaBhosale1:fix_issue_71872_fix_nfs_userid_issue

Conversation

@ShwetaBhosale1

@ShwetaBhosale1 ShwetaBhosale1 commented Jul 3, 2025 •

Copy link
Copy Markdown
Contributor

PR changes:

  1. NFS cluster deploy will use service_name as userId to generate ganesha.conf. Along with that, only one keyring will be created for nfs cluster client.<service_name>.
  2. Changes in upgarde to keep using old userid for cluster created before upgrade

Tracker: https://tracker.ceph.com/issues/71872

Testing done:

  1. created NFS service on newly created cluster
  2. Redeploy on upgraded cluster

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

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from f558340 to 6e03dcb Compare July 3, 2025 03:40
Comment thread src/pybind/mgr/cephadm/services/nfs.py Resolved
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from 6e03dcb to 32bce98 Compare July 4, 2025 08:31
Comment thread src/pybind/mgr/cephadm/module.py Resolved
Comment thread src/pybind/mgr/cephadm/services/nfs.py Resolved
@ShwetaBhosale1
ShwetaBhosale1 requested a review from rkachach July 8, 2025 09:19
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

depends on #63617

@github-actions

github-actions Bot commented Sep 7, 2025

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

github-actions Bot commented Nov 6, 2025

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 github-actions Bot added the stale label Nov 6, 2025
@github-actions

github-actions Bot commented Dec 6, 2025

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

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 github-actions Bot added the stale label Apr 17, 2026
@ShwetaBhosale1
ShwetaBhosale1 marked this pull request as ready for review April 30, 2026 14:51
@ShwetaBhosale1
ShwetaBhosale1 requested review from a team as code owners April 30, 2026 14:51
@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 github-actions Bot added the stale label Jun 29, 2026
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from ff95a0a to 88d7bb1 Compare July 14, 2026 10:41
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from 88d7bb1 to baa2807 Compare July 16, 2026 06:16
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from baa2807 to bf5ccc4 Compare July 16, 2026 09:25
@github-actions

github-actions Bot commented Aug 5, 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

Copilot AI balanced review requested due to automatic review settings August 6, 2026 06:42
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from bf5ccc4 to c2ae48e Compare August 6, 2026 06:42

Copilot AI 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.

Pull request overview

Updates cephadm-managed NFS clusters to use one service-level cephx identity while preserving legacy identities after upgrades.

Changes:

  • Uses client.<service_name> across NFS daemons.
  • Adds migration detection for legacy per-daemon identities.
  • Adjusts configuration, cleanup, and tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/pybind/mgr/cephadm/migrations.py Adds legacy NFS identity migration.
src/pybind/mgr/cephadm/module.py Cleans NFS migration state.
src/pybind/mgr/cephadm/services/nfs.py Implements shared NFS authentication.
src/pybind/mgr/cephadm/services/cephadmservice.py Adjusts generic auth handling.
src/pybind/mgr/cephadm/services/smb.py Aligns auth method signature.
src/pybind/mgr/cephadm/templates/services/nfs/ganesha.conf.j2 Updates generated Ganesha configuration.
src/pybind/mgr/cephadm/tests/test_migration.py Adds migration tests.
src/pybind/mgr/cephadm/tests/test_cephadm.py Updates expected NFS identity.
src/pybind/mgr/cephadm/tests/services/test_ingress.py Updates expected NFS configuration.

Comment thread src/pybind/mgr/cephadm/module.py Resolved
Comment thread src/pybind/mgr/cephadm/services/nfs.py Resolved
Comment thread src/pybind/mgr/cephadm/migrations.py Resolved
…t same across cluster

Also handled upgrade, to keep using old userid for cluster created before upgrade

Tracker: https://tracker.ceph.com/issues/71872
Signed-off-by: Shweta Bhosale <[email protected]>
Copilot AI review requested due to automatic review settings August 6, 2026 07:26
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_71872_fix_nfs_userid_issue branch from c2ae48e to 5d66653 Compare August 6, 2026 07:26

Copilot AI 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.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

Suppressed comments (2)

src/pybind/mgr/cephadm/services/nfs.py:99

  • This branch returns without fencing the stale rank whenever any other daemon in the service remains. With the new shared client.<service_name> credential, the removed/stale daemon retains the same valid key as the active daemons and can continue accessing the recovery namespace, so rank replacement and scale-down lose the credential-revocation behavior that fence() previously provided. A per-daemon fencing credential or another effective revocation mechanism is required before the data-path key can safely be shared.
        # as new auth entity is common across cluster, we will need to delete it for last daemon
        if rados_user == service_name and self.mgr.cache.get_daemons_by_service(service_name):
            logger.debug(f'Not removing key for {entity} as daemons still exists')
            return

src/pybind/mgr/cephadm/services/cephadmservice.py:63

  • NFS is still explicitly accepted for the rotate-key action (module.py:3228-3230), and that path calls CephadmDaemonDeploySpec.entity_name(), which delegates to this helper. Removing nfs here therefore makes every NFS key rotation fail with OrchestratorError("unknown daemon type nfs"). The rotation path also needs to resolve the legacy per-daemon entity versus the new service-wide entity; for a shared entity it must coordinate redeployment of all service daemons rather than rotating just one.
    if daemon_type in ['rgw', 'rbd-mirror', 'cephfs-mirror', "iscsi", 'nvmeof', 'ingress', 'ceph-exporter']:

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

ok to test

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

Left one nitpick comment, but approving because this is in a state where it would be fine to merge

@adk3798
adk3798 merged commit cd6bc96 into ceph:main Aug 19, 2026
7 checks passed
@github-actions

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/32263697248

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