Bug #78202
closedosd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check
0%
Description
ReplicaActive::react(const ReserverGranted&) (src/osd/scrubber/
scrub_machine.cc) builds the GRANT from pending_reservation_nonce after
zeroing it two lines earlier:
pending_reservation_nonce = 0; // no longer pending
auto grant_msg = make_message<MOSDScrubReserve>(
..., MOSDScrubReserve::GRANT, m_pg->pg_whoami, pending_reservation_nonce);
User impact: negligible in practice, which is why it went unnoticed. On the common path the grant is accepted regardless of nonce, so the bug is silent during normal scrubbing. It only matters in a race: a grant for a superseded
request arriving from the peer the primary is still waiting on is accepted as current, and the primary advances its reservation round on a stale ack. The worst effect is transient: a scrub proceeding on stale reservation state, or
momentarily exceeding osd_max_scrubs. No data-integrity, availability, or crash impact; scrub still validates data correctly, only reservation scheduling is affected, and only under the race.
Only the async path is affected (the default: wait_for_resources with osd_scrub_disable_reservation_queuing=false). The sync grant and the REJECT path already send m.reservation_nonce, so the fix matches them.
LF Updated by Laura Flores 5 months ago
Sent to QA.
LF Updated by Laura Flores 4 months ago
Added to a QA batch
KS Updated by Kamoltat (Junior) Sirivadhna 4 months ago
bump up
RZ Updated by Radoslaw Zarzynski 4 months ago
In QA.
RZ Updated by Radoslaw Zarzynski 4 months ago
Still in QA.
UB Updated by Upkeep Bot 4 months ago
- Status changed from Fix Under Review to Pending Backport
- Merge Commit set to c09a72cde6a3764bab1a4bf0fa2d3fcaaf445efd
- Fixed In set to v21.3.0-1811-gc09a72cde6
- Upkeep Timestamp set to 2026-08-06T01:48:45+00:00
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #79101: squid: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #79102: umbrella: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check added
UB Updated by Upkeep Bot 4 months ago
- Copied to Backport #79103: tentacle: osd/scrubber: async scrub reservation GRANT always sends nonce 0, defeating the primary's staleness check added
UB Updated by Upkeep Bot 4 months ago
- Tags (freeform) set to backport_processed
UB Updated by Upkeep Bot 3 months ago
- Status changed from Pending Backport to Backporting
- Tags (freeform) deleted (
backport_processed) - Upkeep Timestamp changed from 2026-08-06T01:48:45+00:00 to 2026-08-27T18:44:26+00:00