oxidecomputer / oxidecomputer/omicron

[wicketd] Uploading trampoline phase 2 retries forever, even in the face of fatal errors

Open
#2,711 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.