oxidecomputer / oxidecomputer/omicron
[wicketd] Uploading trampoline phase 2 retries forever, even in the face of fatal errors
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
When wicketd is uploading the trampoline phase 2 to MGS for it to serve to SPs, it currently retries forever. However, some errors are fatal; if I upload a bogus image, wicketd's logs contain the relevant info:
Dec 28 00:37:41.193 WARN failed to upload trampoline phase 2 to MGS, will retry in 30.940212757s, err: Error Response: status: 400 Bad Request; headers: {"content-type": "application/json", "x-request-id": "ec9e605a-e6ce-46a4-9fc3-3e24c3ce52d1", "content-length": "182", "date": "Sun, 28 Dec 1986 00:37:41 GMT"}; value: Error { error_code: Some("BadHostPhase2Image"), message: "incorrect magic in image header (expected 0x1deb0075, got 0xffffffff)", request_id: "ec9e605a-e6ce-46a4-9fc3-3e24c3ce52d1" }, component: wicketd update planner
but there is no feedback to wicket that the user has uploaded a TUF repo containing bad data.
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 in wicketd/src/update_tracker.rs around lines 1126-1144, where trampoline phase 2 upload failures are retried. Trace how the MGS error response is handled, especially the BadHostPhase2Image example, and identify how fatal errors can be distinguished from retryable ones. Done means bogus uploads stop retrying forever and provide feedback to wicket.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100