Skip to content

tasks/ceph_manager: reset systemd failed state before reviving osd on… - #69871

Merged
SrinivasaBharath merged 1 commit into
ceph:mainfrom
NitzanMordhai:wip-nitzan-thrasher-revive-with-resetting-failed
Sep 2, 2026
Merged

SrinivasaBharath merged 1 commit into
ceph:mainfrom
NitzanMordhai:wip-nitzan-thrasher-revive-with-resetting-failed

Conversation

@NitzanMordhai

@NitzanMordhai NitzanMordhai commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

… cephadm

When an OSD is killed on a cephadm cluster, systemd can mark the service as failed, preventing it from being restarted. Call reset-failed on the osd service before restarting it in revive_osd

Fixes: https://tracker.ceph.com/issues/75570

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.

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

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

This PR updates the teuthology CephManager.revive_osd() path used in cephadm-based QA runs to clear systemd’s “failed” state on an OSD unit before attempting to restart the OSD, addressing cases where systemd blocks restarts after an OSD kill (tracker #75570).

Changes:

  • Add a cephadm-specific systemctl reset-failed call for the target OSD unit prior to restart() when OSD thrashing is active.
  • Add logging and inline comments explaining why the reset is needed.

Comment thread qa/tasks/ceph_manager.py Outdated
@@ -3234,6 +3234,16 @@ def revive_osd(self, osd, timeout=360, skip_admin_check=False):
mount_osd_data(self.ctx, remote, self.cluster, str(osd))
self.make_admin_daemon_dir(remote)
self.ctx.daemons.get_daemon('osd', osd, self.cluster).reset()
if self.cephadm and any(isinstance(t, OSDThrash) for t in self.ctx[self.cluster].thrashers):
Comment thread qa/tasks/ceph_manager.py Outdated
Comment on lines +3238 to +3241
# When thrashing osds during upgrade test, in some point we can
# see the osd service in failed state, which will prevent the
# osd to be restarted. So we need to reset the failed state before
# restarting the osd service.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agree with this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

me too :) fixed

… cephadm

When an OSD is killed on a cephadm cluster, systemd can mark the service
as failed, preventing it from being restarted. Call reset-failed on the
osd service before restarting it in revive_osd

Fixes: https://tracker.ceph.com/issues/75570
Signed-off-by: Nitzan Mordechai <[email protected]>
@NitzanMordhai
NitzanMordhai force-pushed the wip-nitzan-thrasher-revive-with-resetting-failed branch from 8a62f77 to d0a1747 Compare July 2, 2026 05:06
@NitzanMordhai
NitzanMordhai requested a review from Copilot July 2, 2026 05:07

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 1 out of 1 changed files in this pull request and generated no new comments.

@ljflores

Copy link
Copy Markdown
Member

Wasn't getting picked up since it lacked the "core" label.

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath7-testing-20260824.015917-main.

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

jenkins test make check

@SrinivasaBharath
SrinivasaBharath merged commit b743fcb into ceph:main Sep 2, 2026
6 checks passed
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.

5 participants