Skip to content

umbrella: osd/PeeringState: stamp last_clean in pg_stat_t, not pg_history_t - #72967

Merged
batrick merged 2 commits into
ceph:umbrellafrom
shraddhaag:wip-shraddhaag-last-clean-fastinfo-umbrella
Oct 23, 2026
Merged

batrick merged 2 commits into
ceph:umbrellafrom
shraddhaag:wip-shraddhaag-last-clean-fastinfo-umbrella

Conversation

@shraddhaag

Copy link
Copy Markdown
Contributor

backport of #72912

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.

Since 0de8308 ("osd/PeeringState: source the vulnerability-window
latch from pg_history_t"), prepare_stats_for_publish() sets
info.history.last_clean = now on every publish of a clean PG. Stats are
published on every client write (crimson: PG::apply_stats(); classic:
PrimaryLogPG::eval_repop()), so pg_history_t changes on every op.
pg_fast_info_t does not cover pg_history_t, so prepare_info_keymap()
can no longer take the _fastinfo path and writes the full _info on
every write, in both crimson and classic. On SeaStore this also moves
the omap LogManager off its {log entry, _fastinfo} overwrite path.

Stamp pg_stat_t.last_clean on each clean publish instead, as before
0de8308 (it is covered by _fastinfo). A clean publish that does not
close a vulnerability window now leaves pg_history_t unchanged.

The window close must not read pg_stat_t.last_clean: peering copies
pg_stat_t wholesale from other OSDs (Stray::react(MInfoRec),
proc_master_log, update_backfill_progress, split), so a copied value
could close a window early or record a wrong duration. Close the window
on the first publish of a clean PG after the onset instead, timed by
that publish's own clock, and set vuln_window_reported = now.

pg_history_t::merge() now decides if an onset is open against the
merged vuln_window_reported, the same marker prepare_stats_for_publish()
uses, instead of last_clean. last_clean is set to vuln_window_reported
on each close and stays max-merged, so a peer on older code, whose
merge() anchors on it, sees the same open/closed state. The existing
merge_vulnerability_onset_* tests in unittest_osd_types now set
vuln_window_reported, because it is the anchor.

Update the related comments, the pg_vulnerability_duration description
and the TEST_divergent_vulnerability_window comment.

Signed-off-by: Shraddha Agrawal <[email protected]>
(cherry picked from commit 9fdb8dd)
* unittest_peeringstate: VulnerabilityWindowCleanPublishKeepsHistory
  does clean publishes before any vulnerability window and again after
  a recorded close. It checks that pg_history_t does not change, that
  info is not marked dirty, and that pg_stat_t.last_clean advances. A
  pg_history_t change on a clean publish makes prepare_info_keymap()
  write the full _info instead of _fastinfo on every client write.
* unittest_osd_types: merge_vulnerability_onset_ignores_peer_last_clean
  checks that a peer's later last_clean (older code stamps it on every
  clean publish) does not hide an open, unrecorded onset in merge().

Signed-off-by: Shraddha Agrawal <[email protected]>
(cherry picked from commit 1e86278)
@shraddhaag
shraddhaag requested a review from a team as a code owner October 22, 2026 07:00
@github-actions github-actions Bot added this to the umbrella milestone Oct 22, 2026
@shraddhaag
shraddhaag requested a review from sseshasa October 22, 2026 07:01
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 22, 2026

@bill-scales bill-scales 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 - Straightforward backport, needed for Umbrella

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

@batrick

batrick commented Oct 22, 2026

Copy link
Copy Markdown
Member

@batrick batrick removed the releng-audit-fail Release engineering: failed backport verification audit. label Oct 23, 2026
github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 23, 2026
@batrick batrick removed the releng-audit-fail Release engineering: failed backport verification audit. label Oct 23, 2026

@github-actions github-actions Bot 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.

Ceph Release Engineering Audit Report

Automated Redmine Linkage Audit

The following tracking irregularities were found:

  • Missing Original PR(s): Could not identify any main PRs associated with this backport. Ensure the backport commits properly reference the original PRs.

Automated Backport Parity Review - Unmerged Commits Detected

This backport contains cherry-picks of commits that do not appear to be merged into the main branch (could not find an associated merge commit or PR). Backports should only contain commits that have already been merged upstream.

Unmerged Cherry-Picks

Be familiar with the rules and guidelines for writing backports.


Automated Backport Parity Review

Discrepancies detected between the backport PR and the original source PR(s). Please see the Commit Parity Visualizer below.


Commit Parity Visualizer

BACKPORT PR #72967 SOURCE PR SOURCE STATUS
a03291e osd/PeeringState: stamp last_clean in pg_stat_t, not pg_history_t <<<< EXTRA IN BACKPORT >>>>
d767aab test/osd: test that clean publishes keep pg_history_t unchanged <<<< EXTRA IN BACKPORT >>>>

🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Oct 23, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Oct 23, 2026
@github-actions

Copy link
Copy Markdown

✅ Audit Override Applied by @batrick.

View workflow run

@batrick
batrick merged commit 2339990 into ceph:umbrella Oct 23, 2026
18 of 21 checks passed
yuriw added a commit that referenced this pull request Nov 30, 2026
Pick up 10 PRs merged since the last changelog generation
(#73625 #73464 #72913 #72967 #72345 #74280 #73453 #73259 #73261 #72691).

Signed-off-by: Yuri Weinstein <[email protected]>
yuriw added a commit that referenced this pull request Nov 30, 2026
Pick up 10 PRs merged since the last changelog generation
(#73625 #73464 #72913 #72967 #72345 #74280 #73453 #73259 #73261 #72691).

Assisted-by: Claude-v2.1.332:claude-sonnet-5
Signed-off-by: Yuri Weinstein <[email protected]>
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