oxidecomputer / oxidecomputer/omicron

Can't run tests on macOS due to lack of `mgd`

Open
#4,333 6 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

Same deal as #3938 — maghemite doesn't do a Mac build for mgd, so tools/ci_download_maghemite_mgd doesn't do anything on Mac.

thread 'integration_tests::schema::nexus_cannot_apply_update_from_unknown_version' panicked at 'called `Result::unwrap()` on an `Err` value: failed to spawn `mgd` (with args: ["run", "--admin-addr", "::1", "--admin-port", "0", "--no-bgp-dispatcher", "--data-dir", "/var/folders/lk/vsx86g0545g3g2tsmvs50py40000gn/T/.tmp0VxTKj"])

Caused by:
    No such file or directory (os error 2)', /Users/david/oxide/omicron/nexus/test-utils/src/lib.rs:413:63

I tried a workaround analogous to the one for dpd I describe in #3938, namely building mgd myself, but I run into this.

https://github.com/oxidecomputer/netadm-sys/blob/59e69ef8fb17be233e336cf4943e31ae398aa4d1/libnet/src/sys.rs#L696-L706

I think libc::__error() would work on Mac too based on a very cursory search online. Will see if I can test that myself by pointing at a local copy of libnet.

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 with tools/ci_download_maghemite_mgd and nexus/test-utils/src/lib.rs:413 to trace how macOS obtains and spawns mgd. Then inspect the referenced netadm-sys libnet/src/sys.rs lines 696-706 and the proposed libc::__error() workaround. Done means the relevant macOS setup allows the affected integration test to find and run mgd.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
build-system, operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.