Skip to content

mgr/cephadm: Stop NFS service/daemon from starting automatically after reboot, cephadm to manage startup - #66037

Merged
rkachach merged 7 commits into
ceph:mainfrom
ShwetaBhosale1:fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot
Jul 6, 2026
Merged

rkachach merged 7 commits into
ceph:mainfrom
ShwetaBhosale1:fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot

Conversation

@ShwetaBhosale1

@ShwetaBhosale1 ShwetaBhosale1 commented Oct 23, 2025 •

Copy link
Copy Markdown
Contributor

PR fixes:

  1. Disable NFS daemon service, so that daemon will not start automatically after reboot. And serve loops '_check_daemons' method will start the daemon. If service is configured in active-passive mode (placement count < hosts), then the daemon will not start on rebooted node (as failed over to another node) and it will directly get removed. Daemon will be only started if they needs to be started (If same rank daemon exists then only start highest rank generation daemon).
  2. Since the server loop is now starting the NFS daemons, we must ensure that daemons stopped by the user are not restarted. Added user_stopped field in DaemonDescription to track it.
  3. For one NFS instance case, as fence_old_rank was happening in every loop, the down node's rank map was getting removed and daemon was getting redeployed once node is up.
  4. The case where NFS is deployed with just placement hosts, when node with low rank was getting down, the node with high rank was getting redeployed with the rank of down daemon.

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

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 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch 2 times, most recently from bc5a752 to c0163dc Compare October 23, 2025 12:50
@ShwetaBhosale1 ShwetaBhosale1 changed the title mgr/cephadm: Stop NFS service/daemon from starting automatically afte… mgr/cephadm: Stop NFS service/daemon from starting automatically after reboot, cephadm to manage startup Oct 23, 2025
@ShwetaBhosale1
ShwetaBhosale1 marked this pull request as ready for review October 23, 2025 13:17
@ShwetaBhosale1
ShwetaBhosale1 requested a review from a team as a code owner October 23, 2025 13:17
Comment thread src/pybind/mgr/cephadm/schedule.py Resolved
Comment thread src/pybind/mgr/cephadm/module.py Resolved
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from c0163dc to 7bc149a Compare October 24, 2025 07:05
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@adk3798

adk3798 commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

jenkins render docs

@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from f4e1372 to 5d7eca5 Compare November 27, 2025 17:23
@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 Jan 26, 2026
@github-actions github-actions Bot removed the stale label Feb 12, 2026
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from 5d7eca5 to 0e987d5 Compare March 23, 2026 11:27
@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_73442_nfs_getting_restarted_twice_in_case_of_reboot branch 2 times, most recently from e823578 to 0fad74f Compare April 30, 2026 14:55
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from 0fad74f to e94b890 Compare May 4, 2026 05:17
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from 98d5253 to 87b0dc4 Compare May 18, 2026 15:50
@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_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from 87b0dc4 to 345545d Compare June 11, 2026 07:33
@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

…daemon exists with same rank

If the removal of an extra NFS daemon fails for any reason, that daemon should not be started, as the NFS daemon with the highest rank generation is already running.

Fixes: https://tracker.ceph.com/issues/73442
Signed-off-by: Shweta Bhosale <[email protected]>
…en NFS daemon colocation is enabled

When colocation of NFS daemons is allowed, the existing rank calculation incorrectly derives the
rank based solely on the number of hosts. This leads to inaccurate rank assignment because the logic
does not account for the full set of potential candidates, especially in scenarios where multiple
daemons can reside on the same host.

Fixes: https://tracker.ceph.com/issues/73442
Signed-off-by: Shweta Bhosale <[email protected]>
…p if needed

If the ingress service is configured with a placement count lower than the number of hosts,
then when one node goes down, Keepalived is configured on the remaining hosts.
When the failed host comes back up, if it was previously configured as the master,
the VIP may become active on two hosts. To prevent this, Keepalived is disabled by default
and started within the service loop.

Fixes: https://tracker.ceph.com/issues/76304
Signed-off-by: Shweta Bhosale <[email protected]>
…vice is scaled down

When scaling ingress down with a ranked NFS backend that still has more
daemons than its placement target, remove ingress from hosts without NFS
first and skip removing co-located ingress on NFS hosts until the next
iteration after NFS scales down.

Fixes: https://tracker.ceph.com/issues/76304
Signed-off-by: Shweta Bhosale <[email protected]>
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the fix_issue_73442_nfs_getting_restarted_twice_in_case_of_reboot branch from 345545d to c20ba11 Compare July 1, 2026 15:40
@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@ShwetaBhosale1

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@rkachach

rkachach commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@rkachach
rkachach merged commit 8d6d1a1 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/28785149082

@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 found one or more Fixes: tags in the commit messages in

git log 8d6d1a1f5cf184410092c768faac3530a0b1e4eb^..8d6d1a1f5cf184410092c768faac3530a0b1e4eb

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

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.

3 participants