Skip to content

[sled-agent] Look for zone images in the boot M.2's install directory#3021

Merged
smklein merged 76 commits into
mainfrom
opt-oxide
May 9, 2023
Merged

[sled-agent] Look for zone images in the boot M.2's install directory#3021
smklein merged 76 commits into
mainfrom
opt-oxide

Conversation

@smklein

@smklein smklein commented May 5, 2023

Copy link
Copy Markdown
Collaborator

For most services: Look in the M.2's install directory after looking in "/opt/oxide" when searching for zone images.

Note that propolis images are an exception - we only look for them in the ramdisk.

Fixes #2971

smklein added 30 commits April 28, 2023 09:54
…zones, zone_name -> zone_type, config -> ledger
## Before this PR

Running on rack2 and calling `omicron-package uninstall` would involve a
fatal termination of the connection, as it would delete the `cxgbe0/ll`
and `cxgbe1/ll` IP addresses necessary for contacting the sled.

## After this PR

Those addresses are left alone. This is pretty useful for development,
as it allows us to run `uninstall` to cleanly wipe a Gimlet, preparing
it for future "clean installs".
@smklein smklein marked this pull request as draft May 5, 2023 01:10
///
/// If this returns `None`, we have not processed the boot disk yet.
pub async fn boot_disk(&self) -> Option<DiskIdentity> {
pub async fn boot_disk(&self) -> Option<(DiskIdentity, ZpoolName)> {

@smklein smklein May 5, 2023

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A caller could call this function trying to find information about the disk itself (e.g. the ramdisk partition, dump device, etc) or about the zpool.

I return info for both for now, just to satisfy both use-cases. This could be made more structured later.

@smklein smklein marked this pull request as ready for review May 5, 2023 16:05
@smklein smklein requested review from andrewjstone and jgallagher May 5, 2023 16:05
Comment thread illumos-utils/src/running_zone.rs Outdated
Base automatically changed from var-oxide-how-about-nar-oxide to main May 9, 2023 19:13
@smklein smklein enabled auto-merge (squash) May 9, 2023 19:16
@smklein smklein merged commit d041bc9 into main May 9, 2023
@smklein smklein deleted the opt-oxide branch May 9, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sled agent should move all software images from /opt/oxide into /pool/int/<UUID>/install.

2 participants