Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ hyper = "1.6.0"
hyper-util = "0.1.11"
hyper-rustls = "0.26.0"
hyper-staticfile = "0.10.1"
iddqd = { version = "0.3.0", features = ["daft", "serde"] }
iddqd = { version = "0.3.5", features = ["daft", "serde"] }
id-map = { path = "id-map" }
illumos-utils = { path = "illumos-utils" }
iana-time-zone = "0.1.63"
Expand Down
1 change: 1 addition & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dropshot.workspace = true
futures.workspace = true
hex.workspace = true
http.workspace = true
iddqd.workspace = true
id-map.workspace = true
ipnetwork.workspace = true
lldp_protocol.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions common/src/update/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

mod artifact_id;
mod mupdate_override;
mod zone_manifest;

pub use artifact_id::*;
pub use mupdate_override::*;
pub use zone_manifest::*;
3 changes: 3 additions & 0 deletions common/src/update/mupdate_override.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ pub struct MupdateOverrideInfo {
pub mupdate_uuid: MupdateOverrideUuid,

/// Artifact hashes written out to the install dataset.
///
/// Currently includes the host phase 2 and composite control plane
/// artifacts.
pub hash_ids: BTreeSet<ArtifactHashId>,
}

Expand Down
52 changes: 52 additions & 0 deletions common/src/update/zone_manifest.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use iddqd::{IdOrdItem, IdOrdMap, id_upcast};
use omicron_uuid_kinds::MupdateUuid;
use serde::{Deserialize, Serialize};
use tufaceous_artifact::ArtifactHash;

/// Describes the set of Omicron zones written out into an install dataset.
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct OmicronZoneManifest {
/// The UUID of the mupdate which created this manifest. Intended primarily
/// for checking equality.
pub mupdate_id: MupdateUuid,

/// Omicron zone file names and hashes.
pub zones: IdOrdMap<OmicronZoneFileMetadata>,
}

impl OmicronZoneManifest {
/// The name of the file.
pub const FILE_NAME: &str = "zones.json";
}

/// Information about an Omicron zone file written out to the install dataset.
///
/// Part of [`OmicronZoneManifest`].
#[derive(
Clone, Debug, Eq, Ord, PartialEq, PartialOrd, Deserialize, Serialize,
)]
pub struct OmicronZoneFileMetadata {
/// The file name.
pub file_name: String,

/// The file size.
pub file_size: u64,

/// The hash of the file.
pub hash: ArtifactHash,
}

impl IdOrdItem for OmicronZoneFileMetadata {
type Key<'a> = &'a str;

#[inline]
fn key(&self) -> Self::Key<'_> {
&self.file_name
}

id_upcast!();
}
3 changes: 3 additions & 0 deletions installinator-common/src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ pub enum ControlPlaneZonesStepId {
/// Writing the MUPdate override file.
MupdateOverride,

/// Writing the zone manifest.
ZoneManifest,

/// Syncing writes to disk.
Fsync,

Expand Down
1 change: 1 addition & 0 deletions installinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ display-error-chain.workspace = true
futures.workspace = true
hex.workspace = true
http.workspace = true
iddqd.workspace = true
illumos-utils.workspace = true
installinator-client.workspace = true
installinator-common.workspace = true
Expand Down
1 change: 1 addition & 0 deletions installinator/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ impl InstallOpts {
control_plane_zones.into_value(cx.token()).await;

let mut writer = ArtifactWriter::new(
image_id.update_id,
&host_2_phase_id_2,
&host_phase_2_artifact.artifact,
&control_plane_id_2,
Expand Down
Loading
Loading