oxidecomputer / oxidecomputer/omicron
omdb db disks info UUID dumps core if I give it a non disk UUID:
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
omdb db disks info dumps core if I give it a non disk UUID:
root@oxz_switch0:~# omdb db disks info b93470b4-1d2e-4971-92bd-b1a9a2041426
note: database URL not specified. Will search DNS.
note: (override with --db-url or OMDB_DB_URL)
note: using DNS from system config (typically /etc/resolv.conf)
note: (if this is not right, use --dns-server to specify an alternate DNS server)
note: using database URL postgresql://root@[fd00:1122:3344:109::3]:32221,[fd00:1122:3344:105::3]:32221,[fd00:1122:3344:10b::3]:32221,[fd00:1122:3344:107::3]:32221,[fd00:1122:3344:108::3]:32221/omicron?sslmode=disable
note: database schema version matches expected (246.0.0)
thread 'main' (1) panicked at dev-tools/omdb/src/bin/omdb/db.rs:2569:14:
called `Result::unwrap()` on an `Err` value: NotFound
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Abort (core dumped)
It can do better than dump core :)
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 dev-tools/omdb/src/bin/omdb/db.rs at line 2569 and reproduce the issue with omdb db disks info using a non-disk UUID. Trace the NotFound result that is unwrapped, then verify that the command reports the lookup failure without panicking or producing a core dump.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100