oxidecomputer / oxidecomputer/omicron

Sled Agent should always use the "A" M.2 slot for ledgered data

Open
#8,654 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Currently, Sled Agent tries to read from and write to both M.2 slots:

  • sometimes scanning both disks and looking at the highest generation across them (Ledgerable trait)
  • sometimes considering the boot slot as authoritative (e.g. mupdate override data)

That is incorrect in some pretty important ways:

  • if one of the disks disappears temporarily, implementations of the Ledgerable trait might read old data
  • if the disks couldn't be synced and the boot disk slot changes, we'll suddenly be making decisions based on outdated information

If we had an odd number of disks we could potentially address this through majority consensus. But we have two disks, and it's not really feasible to keep them in sync at all times. For this kind of data we should just always pick a specific slot -- between the A and the B slots, the natural one to pick is A.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate Sled Agent implementations of the Ledgerable trait and the mupdate override-data path. Trace every M.2 slot selection, then confirm that affected ledgered-data paths consistently choose slot A rather than boot-slot or highest-generation selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.