oxidecomputer / oxidecomputer/omicron

SystemDescription and ExampleSystem should store Policy structs directly

Open
#6,803 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Followup from #6785.

Currently, SystemDescription and ExampleSystem store all the fields from Policy separately. This means that each time we add a policy field, we have to go around adding it to both of these components. It would be really nice to store Policy directly since we expect that knobs become automatically available.

One current challenge with that is that the default Nexus allocation policy in ExampleSystem is one Nexus instance per sled. The Policy struct isn't quite amenable to representing that since it accepts the number of Nexus zones as a usize.

  • In response to that, we could change the Policy struct to make the Nexus zone policy more complex than that. But I'm hesitant to do so because production always wants a fixed number of Nexus users.
  • Instead, it seems to be easier to update the tests that expect a non-standard number of Nexus zones to set the policy accordingly.

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 the SystemDescription, ExampleSystem, and Policy definitions and trace the tests that expect a non-standard number of Nexus zones. Start by comparing how Policy fields are currently stored in the two components. Done means both store Policy directly and the affected tests set the required Nexus zone policy explicitly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.