Skip to content

some of reconfigurator-cli's sled state management is error-prone and not faithful to real systems #11592

Open

Description

@davepacheco

These probably could be separate issues but they may relate so for now I'm just writing them down in one place.

While working on RFD 747 and exploring the "sled add" behavior (see this comment), I ran into several paper cuts.

  1. It'd be nice to have commands like these that would avoid having to hardcode a bunch of stuff like in the linked comment:
sled-update-sp SERIAL --to-target-release
sled-update-rot SERIAL --to-target-release
sled-update-rot-bootloader SERIAL --to-target-release
sled-update-host-phase1 SERIAL --to-target-release
  1. A command like sled-set-all --to-target-release (or something) would be a handy one-shot command to make everything on a sled match what Reconfigurator would do. That would trim a lot of the preamble in reconfigurator-cli: reduce boilerplate for tests that want to simulate an update #11403 -- you'd run this command for each sled instead of all those specific commands.

  2. A command like this:

sled-mupdate SERIAL --to-initial | --to-target-release

could do what a MUPdate generally does:

  • set the mupdate override flag with a new value
  • set all the components (SP, RoT, RoT bootloader, host phase 1/2, zones, and measurements) to some canned values

I wanted this for testing the "add sled" case (where a sled shows up MUPdated) and I expect it would simplify the MUPdate tests, though we'd want to verify that it would work for those. On the other hand, if we do the next item, we probably wouldn't use this for the "sled add" case.

  1. It would be good to verify (or else ensure) that the initial state you get from load-example and sled-add accurately reflects the situation that they're trying to simulate. I think load-example should probably create a system that looks like it's just been RSS'd, but before Reconfigurator has run. That would include all the zones deployed like today, but would have MUPdate overrides set (I think). sled-add should similarly look like a just-MUPdated sled. In both cases, I think we'd expect that running sled-mupdate --to-initial would change nothing.

I'm not sure if this will impact a lot of tests, but it seems worth it to be more realistic. It may end up simplifying a lot.

Activity

  1. davepacheco commented on Oct 23, 2026

    @davepacheco
    CollaboratorAuthor

    A couple of other things I noticed:

    • The initial measurements set for a sled is empty, which I think is inconsistent with a just-MUPdated sled and makes it behave differently when you're trying to test "sled add".
    • There's no way I found to set the measurements to a specific set. We have this for most other things (SP, RoT, RoT bootloader, host OS phase 1 and 2), but I think we also don't have it for the install dataset images. This was a problem for what I was trying to test but maybe more digging here is needed to better understand that. (It's a little surprising reading a bunch of the tests that when we want to set a specific set of values overall, we set specific versions for things like the SP, RoT, etc. but for measurements we run a planner lap and deploy the config instead. In my case, this was a problem because I wanted to see what happened if the measurements contained some wrong value. I maybe could have tested this with a combination of sled-mupdate --to-initial + setting various component values to the current target release.)
    • I didn't find a way to print out the host phase 1 and 2 details (active/boot slot and hashes). We have this for most other things.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions