blueprint-execution: Can we remove the "list sleds from db" step?

Open
#7,526 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
backend, databases

Research direction

Start in nexus/reconfigurator/execution/src/lib.rs around lines 281-283 and trace how the sled query feeds the three PUT-to-sled-agent steps and deploy_dns. Read the blueprint and planner representations next, then determine whether sled-agent addresses and scrimlet identity belong in the blueprint. Done means execution no longer relies on the sled table for this information, with tests covering both paths.

Written by the indexing model from the issue text.

Description

Prior to the execution steps that send requests to sled-agents, blueprint execution currently queries the sled table for all in-service sleds: https://github.com/oxidecomputer/omicron/blob/31767f6581ed5e109885632e2f10d4615c225d48/nexus/reconfigurator/execution/src/lib.rs#L281-L283

This seems a little confusing - doesn't the blueprint being executed already list the sleds that it believes to be in service?

In practice, the returned list of sleds is used for two things:

  1. In the three PUT-to-sled-agent steps, we use sled.sled_agent_address() (this comes from the ip+port columns in the sled table)
  2. In the deploy_dns step, we use sled.is_scrimlet() to find the scrimlets to set up DNS entries for services in the switch zones

I think we could easily address 1 - we could either infer a sled's underlay address from the underlay IPs of any zones it contains plus the known port sled-agent listens on, or we could add the sled-agent underlay addresses to the blueprint explicitly.

I'm a little less sure about 2 - should the planner be aware of which sleds were scrimlets at the time of planning? Will it need to do this as we get into live update?

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

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.

More from oxidecomputer/omicron

All issues in oxidecomputer/omicron

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.