oxidecomputer / oxidecomputer/omicron
sled-agent could use optional dependency on baseline service
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
I noticed 13 messages in my sled-agent log leading up to a successful Nexus handoff (i.e., the success case):
23:16:20.047Z WARN SledAgent (ServiceManager): Failed to initialize switch zone: Failed to install zone 'oxz_switch' from '/opt/oxide/switch.tar.gz': Failed to execute zoneadm command 'Install' for zone 'oxz_switch': Failed to parse command output: exit code 1
stdout:
INFO: omicron: installing zone oxz_switch @ "/zone/oxz_switch"...
INFO: omicron: replicating /usr tree...
INFO: omicron: replicated /usr: 23247 files, 372443399, bytes, 2025 msec
INFO: omicron: replicating /lib tree...
INFO: omicron: replicated /lib: 256 files, 3273194, bytes, 28 msec
INFO: omicron: replicating /sbin tree...
INFO: omicron: replicated /sbin: 0 files, 0, bytes, 2 msec
INFO: omicron: pruning SMF manifests...
INFO: omicron: pruning global-only files...
stderr:
Error: could not locate "gzonly.txt" in any baseline directory
file = sled-agent/src/services.rs:4362
It looks like those messages predate the time when the omicron/baseline service came online:
root@g0:~# svcs baseline
STATE STIME FMRI
online 23:16:20 svc:/system/omicron/baseline:default
After that timestamp, the messages stopped and setup proceeded.
The svc:/system/omicron/baseline:default is essentially an enabling workaround for running Omicron bits on mutable install-to-disk systems like workstations, etc. The service doesn't exist at all on production systems because, as described in omicron1(7), we create the baseline during the build of the ramdisk image and ship it in place.
With this in mind, I think you could give sled-agent an optional_all dependency on the baseline service, which should give the correct startup sequencing on a development system but be silently ignored in the production ramdisk.
Originally posted by @davepacheco in https://github.com/oxidecomputer/omicron/issues/5702#issuecomment-2287401871
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 by locating sled-agent's service definition and inspecting how its existing SMF service dependencies are declared. Confirm the optional baseline dependency is used for development startup sequencing while remaining absent or harmless on production ramdisk systems. Done means the relevant startup warnings no longer occur when baseline comes online later.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100