oxidecomputer / oxidecomputer/omicron

sled-agent should use libtopo more (or at all!)

Open
#8,732 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, sled-agent detects disks via libdevinfo as described in RFD 352, which also describes this as an expediency decision: this limits sled-agent to handling disks that are all of: physically present, powered, with a driver attached. If anything on the path to attaching a driver goes wrong, sled-agent just won't see the disk anymore. When we change this, we should remember to update RFD 352 to match.

I am imminently adding CPU family detection logic to sled-agent, which duplicates the same detection done in the kernel. A really disappointing solution would be to use libtopo and match on the revision of GN-B1 or whatever to CPU families, a better solution would be to enhance libtopo to include the CPU family and uarch identified by the kernel, but both solutions involve "use libtopo to collect a topology snapshot and walk it for details you need".

In both cases our lives would be a little better if we used libtopo, so we ought to one day.

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

Start by reading RFD 352 and the existing sled-agent disk detection that uses libdevinfo. Review the libtopo topology-snapshot approach described in the issue and the CPU-family work in PR 8725. Before implementation, define which disk and CPU details libtopo must provide; done should include updating RFD 352 to match the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.