oxidecomputer / oxidecomputer/omicron
SP/MGS: want better way to identify failure to read caboose
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
This is similar to #8013. I found that: let's say you start with the SP having valid images in both of its slots. Then you start an update (which writes to the inactive slot). While this is going on, if you try to fetch information about the caboose, you can get at least two different errors:
Error Response: status: 503 Service Unavailable; headers: {"content-type": "application/json", "x-request-id": "361b3d0a-b031-40f9-a74e-50cb9811fbbc", "content-length": "247", "date": "Wed, 02 Apr 2025 23:57:38 GMT"}; value: Error { error_code: Some("SpCommunicationFailed"), message: "error communicating with SP SpIdentifier { typ: Power, slot: 0 }: Error response from SP: the image caboose does not contain 'VERS'", request_id: "361b3d0a-b031-40f9-a74e-50cb9811fbbc" }
(in case it matters, this specific message might be a different case -- I actually just found a system in this state -- but I've seen the same message reported in the case I'm describing)
or a similar response with message "the image does not include a caboose".
It makes sense that you could see either of these and I think it's reasonable that the SP and MGS reports the fact here ("the image does not include a caboose") rather than the inference ("the image here is not valid or in some in-between state"). But the consumer does need to distinguish these cases from transient errors communicating with MGS or the SP. Currently, it does that based on the error message:
https://github.com/oxidecomputer/omicron/blob/1d3958c3269116fbe41240d1d1fa9fe93dfb7cac/nexus/mgs-updates/src/sp_updater.rs#L248-L253
For the same reasons as in #8013, it'd be nice if it could use a structured error response if it were a 400-level error.
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 nexus/mgs-updates/src/sp_updater.rs around lines 248-253 and compare the related discussion in issue #8013. Trace the caboose-read error responses from the SP and MGS, then define completion as a structured 400-level error that lets the consumer distinguish missing or unreadable cabooses from transient communication failures without parsing message text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100