oxidecomputer / oxidecomputer/oxide.rs
oxide from-image error message hard to correlate to failure
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 75
- Forks
- 21
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
I ran an attempted image create that failed because the disk size was too large; however, that was non-obvious from the error message that we got back. The primary reason is that it highlighted a size key, but there was no corresponding thing that I typed on the CLI. While it was somewhat obvious just based on sizing in this request, it'd be nice if we could somehow tell the user which field was actually bad rather than plopping a bunch of JSON:
rm@zelda ~/oxide/src/oxide.rs $ ./target/release/oxide instance from-image --image 04ffb229-6c78-4bc4-baa3-b4f07f16bea3 --name omnios --project ackbar --description "bbbuuuuiiiiilllllddddd" --hostname omnios --memory 64g --ncpus 24 --disk-size 1t --start
Error Response: status: 400 Bad Request; headers: {"content-type": "application/json", "x-request-id": "17dfcaec-6cf3-4b7e-90fe-8f0d88071a38", "content-length": "176", "date": "Mon, 09 Oct 2023 15:03:06 GMT"}; value: Error { error_code: Some("InvalidValue"), message: "unsupported value for \"size\": total size must be less than 1023 GiB", request_id: "17dfcaec-6cf3-4b7e-90fe-8f0d88071a38" }
In an ideal world, this would be something like: Failed to create instance: unsupported value for '--disk-size': total size must be less than 1023 GiB, passed 1024 GiB.
Contributor guide
No contributing guide indexed for this repository
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 at the instance from-image CLI entry point and trace how the API error response is formatted. Reproduce the shown command with an oversized --disk-size; done means the error identifies --disk-size and includes the invalid value and server explanation instead of only the JSON size key.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100