oxidecomputer / oxidecomputer/omicron

is rack setup request still idempotent?

Open
#10,048 0 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

Per RFD 278 ("RSS to Nexus Handoff"), the handoff-of-control (i.e. "rack initialize") request from RSS to Nexus must be idempotent. At one point, we achieved that by putting everything into one big database transaction inside datastore.rack_set_initialized():
https://github.com/oxidecomputer/omicron/blob/d3b6e929549852d0f35b8d1486777c85555a2056/nexus/db-queries/src/db/datastore/rack.rs#L705-L732

However, there's now a bunch of code at the app layer that invokes datastore methods directly:
https://github.com/oxidecomputer/omicron/blob/d3b6e929549852d0f35b8d1486777c85555a2056/nexus/src/app/rack.rs#L220-L695

This makes it a lot harder to tell if the API request is idempotent. If it's not, any error here could cause rack setup to fail altogether and require clean slate to start again.

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 with RFD 278, then trace datastore.rack_set_initialized() in nexus/db-queries/src/db/datastore/rack.rs and the app-layer calls in nexus/src/app/rack.rs. Follow the rack initialize request through each datastore operation and its error paths. Done means the request's idempotency is verified, or the specific non-idempotent behavior and required scope are documented.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.