Skip to content

[reconfigurator] only clear the "will remove mupdate override" field if inventory is up-to-date#10391

Merged
sunshowers merged 5 commits intomainfrom
sunshowers/spr/check-for-stale-inventory-in-mupdate-override
May 7, 2026
Merged

[reconfigurator] only clear the "will remove mupdate override" field if inventory is up-to-date#10391
sunshowers merged 5 commits intomainfrom
sunshowers/spr/check-for-stale-inventory-in-mupdate-override

Conversation

@sunshowers
Copy link
Copy Markdown
Contributor

@sunshowers sunshowers commented May 6, 2026

In #10392, we found while progressing along the MUPdate recovery state machine (RFD 556), duelling Nexuses might trample over each other based on stale inventory.

The specific reproduction is covered in the added reconfigurator-cli test, but to recap: Let's say there are two inventory collections, C1 and C2. C1 was collected right before the MUPdate, and C2 right after. Then, the failure happens if:

  • Nexus 1 reads C2 and starts processing the MUPdate override, creating a blueprint B1.
  • Nexus 2 has C1 cached, and creates a blueprint B2 with parent B1 but based on collection C1.
  • In C1, the mupdate override is not present, so Nexus 2 believes (based on this outdated collection) that more progress has been made along the MUPdate recovery state machine.

The fix in this PR is to use the Sled Agent generation number stored in the parent blueprint as an indicator. If the Sled Agent generation gathered from inventory is older than that, then that is a sign that inventory is stale, and we shouldn't clear the "will remove mupdate override" field as a result.

We're hoping to cherry-pick this PR onto the r19 release branch. There is a very similar bug around setting the "will remove mupdate override" field as well. We believe the downsides of that bug are not as bad (i.e. the planner doesn't end up along a path which makes things worse), so we're currently not planning to pick that for 19.3. (We would like to get this bug fixed for release 20 though -- expect a PR for it soon.)

Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title check for stale inventory in mupdate override check for stale inventory in mupdate override code May 6, 2026
sunshowers added 2 commits May 6, 2026 15:07
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Copy link
Copy Markdown
Collaborator

@davepacheco davepacheco left a comment

Choose a reason for hiding this comment

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

I've not reviewed the test output changes but the test changes and code changes look good to me. A second set of eyes would be good.

Comment on lines +1 to +5
# This test exercises the bug where, in the mupdate override flow, the planner
# would clear `remove_mupdate_override` from a sled's blueprint based on stale
# inventory -- specifically, an inventory collection that was captured before
# the sled was mupdated, so the override marker isn't visible in it.
#
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit, take it or leave it: I generally frame this sort of thing without reference to the past... as in: "This test verifies that when resolving a MUPdate, the system correctly avoids resolving images when the inventory is stale."

Copy link
Copy Markdown
Contributor Author

@sunshowers sunshowers May 7, 2026

Choose a reason for hiding this comment

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

Changed this to not refer to the bug but rather to the correct behavior:

# This test verifies that when resolving a MUPdate, the planner does not clear
# the "will remove mupdate override" field from a sled's blueprint based on stale
# inventory -- specifically, an inventory collection that occurred before
# the sled was MUPdated, so the mupdate override UUID isn't visible in it.

Comment thread dev-tools/reconfigurator-cli/tests/input/cmds-mupdate-stale-inventory.txt Outdated
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title check for stale inventory in mupdate override code check for stale inventory in bp code to clear "will remove mupdate override" May 7, 2026
@sunshowers sunshowers changed the title check for stale inventory in bp code to clear "will remove mupdate override" [reconfigurator] only clear the "will remove mupdate override" field if inventory is up-to-date May 7, 2026
@AlejandroME AlejandroME added this to the 19 milestone May 7, 2026
@sunshowers sunshowers marked this pull request as ready for review May 7, 2026 19:39
@sunshowers
Copy link
Copy Markdown
Contributor Author

Tested this on berlin and the happy path appears to work well. The race condition is a bit hard to set up in a live system but we have reproduced it in the simulator (and this PR includes a test).

@sunshowers sunshowers merged commit 60352ac into main May 7, 2026
16 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/check-for-stale-inventory-in-mupdate-override branch May 7, 2026 20:35
iliana pushed a commit that referenced this pull request May 7, 2026
…e" field if inventory is up-to-date (#10391)

Original-Commit: 60352ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants