oxidecomputer / oxidecomputer/omicron
is rack setup request still idempotent?
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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