oxidecomputer / oxidecomputer/propolis

propolis-package: produces output that omicron finds cromulent, despite missing propolis-server binary

Open
#812 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

I have some scripts I use which build propolis/crucible, package them as appropriate, and then generate a tuf repo with the standard tuf releng tool.

I encountered a benign compilation error with propolis, due to an out of date toolchain on my system.

error[E0658]: the `#[expect]` attribute is an experimental feature
   --> /home/vi/.cache/tuf-builder/crucible/upstairs/src/io_limits.rs:126:5
    |
126 |     #[expect(unused)]
    |     ^^^^^^^^^^^^^^^^^
    |
    = note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information

Consequently, the propolis-server binary was never generated.

propolis-package did complain about this:

     Running `target/debug/propolis-package`
Error: Cannot append binary to tarfile: No such file or directory (os error 2) when getting metadata for target/release/propolis-server

However, the package output file was left in place:

vi@materia ~/.c/t/propolis (master)> tar tf out/propolis-server.tar.gz 
oxide.json
root/
root/var
root/var/svc
root/var/svc/manifest
root/var/svc/manifest/site
root/var/svc/manifest/site/propolis-server
root/var/svc/manifest/site/propolis-server/config.toml
root/var/svc/manifest/site/propolis-server/manifest.xml
root/
root/opt
root/opt/oxide
root/opt/oxide/lib
root/opt/oxide/lib/svc
root/opt/oxide/lib/svc/manifest
root/opt/oxide/lib/svc/manifest/propolis
root/opt/oxide/lib/svc/manifest/propolis/propolis.sh
root/
root/opt
root/opt/oxide
root/opt/oxide/propolis-server
root/opt/oxide/propolis-server/bin

My script proceeded to execute the tuf repo releng task, which accepted this as input. This was well up my scrollback of logs, and ultimately, I did not learn of the error until I tried to launch a VM, where found it in the "starting" state forever.

Now, truthfully, my script should have checked whether building the binary was successful and bailed before even running propolis-package. That said, in the event of errors like this, propolis-package ought to avoid placing an acceptable package at the location the tuf builder looks, perhaps by assembling the tarfile in a file with a different name, and renaming it only after it's done successfully.

Contributor guide

No contributing guide indexed for this repository

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 with the propolis-package entry point and trace how it creates out/propolis-server.tar.gz when target/release/propolis-server is missing. Reproduce the missing-binary packaging error and verify that a failed run does not leave a package at the path consumed by the tuf repository releng task.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.