From e56e2394eb5f581a1957c47c520344d85533e704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karen=20C=C3=A1rcamo?= Date: Wed, 21 Feb 2024 16:54:39 +1300 Subject: [PATCH] Create composite crucible and pantry packages (#4927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create new packages for crucible and pantry to include the zone network config service. Depends on https://github.com/oxidecomputer/crucible/pull/1096. These two PRs should be merged in coordination Related: https://github.com/oxidecomputer/omicron/issues/1898 ### Crucible updates This PR also merges a few changes from Crucible: * fe0c5c7 - [smf] Use new zone network config service * 3d48060 - (upstream/main) Move a few methods into downstairs * b01e15c - Remove extra clone in upstairs read * b4f37b4 - Make `crucible-downstairs` not depend on upstairs * 733b7f9 - Update Rust crate rusqlite to 0.31 * 961e971 - Update Rust crate reedline to 0.29.0 * b946a04 - Update Rust crate clap to 4.5 * 39f1f3f - Update Rust crate indicatif to 0.17.8 * 4ea9387 - Update progenitor to bc0bb4b * ace10f4 - Do not 500 on snapshot delete for deleted region * 4105133 - Drop jobs from Offline downstairs. * 43dace9 - `Mutex` → `Work` * a1f3207 - Added a contributing.md * 13b8669 - Remove ExtentFlushClose::source_downstairs * 9b3f366 - Remove unnecessary mutexes from Downstairs --- .github/buildomat/jobs/package.sh | 4 ++-- package-manifest.toml | 29 +++++++++++++++++++++++------ sled-agent/src/services.rs | 22 ++++++++++++++-------- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/.github/buildomat/jobs/package.sh b/.github/buildomat/jobs/package.sh index 8546a67a4f..13f374779c 100755 --- a/.github/buildomat/jobs/package.sh +++ b/.github/buildomat/jobs/package.sh @@ -111,8 +111,8 @@ zones=( out/clickhouse.tar.gz out/clickhouse_keeper.tar.gz out/cockroachdb.tar.gz - out/crucible-pantry.tar.gz - out/crucible.tar.gz + out/crucible-pantry-zone.tar.gz + out/crucible-zone.tar.gz out/external-dns.tar.gz out/internal-dns.tar.gz out/omicron-nexus.tar.gz diff --git a/package-manifest.toml b/package-manifest.toml index 9b72dd7d18..d7f42794ee 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -389,13 +389,28 @@ source.packages = [ "sp-sim.tar.gz" ] output.type = "zone" output.intermediate_only = true +[package.crucible-zone] +service_name = "crucible" +only_for_targets.image = "standard" +source.type = "composite" +source.packages = [ "crucible.tar.gz", "zone-network-setup.tar.gz" ] +output.type = "zone" + + +[package.crucible-pantry-zone] +service_name = "crucible_pantry" +only_for_targets.image = "standard" +source.type = "composite" +source.packages = [ "crucible-pantry.tar.gz", "zone-network-setup.tar.gz" ] +output.type = "zone" + # Packages not built within Omicron, but which must be imported. # Refer to # https://github.com/oxidecomputer/crucible/blob/main/package/README.md # for instructions on building this manually. [package.crucible] -service_name = "crucible" +service_name = "crucible_prebuilt" only_for_targets.image = "standard" # To manually override the package source (for example, to test a change in # both Crucible and Omicron simultaneously): @@ -405,22 +420,24 @@ only_for_targets.image = "standard" # 3. Use source.type = "manual" instead of "prebuilt" source.type = "prebuilt" source.repo = "crucible" -source.commit = "796dce526dd7ed7b52a0429a486ccba4a9da1ce5" +source.commit = "fe0c5c7909707a0f826025be4fe2bbf5f6e0206f" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible.sha256.txt -source.sha256 = "8b654627a4250e8d444133cf3130838d224b13e53f3e48cf0d031314d6f05ee0" +source.sha256 = "5da4f93b16fc7c0f3cc3a67919dbaa3f143cc07b703183a236f5c98b61504d15" output.type = "zone" +output.intermediate_only = true [package.crucible-pantry] -service_name = "crucible_pantry" +service_name = "crucible_pantry_prebuilt" only_for_targets.image = "standard" source.type = "prebuilt" source.repo = "crucible" -source.commit = "796dce526dd7ed7b52a0429a486ccba4a9da1ce5" +source.commit = "fe0c5c7909707a0f826025be4fe2bbf5f6e0206f" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible-pantry.sha256.txt -source.sha256 = "8602b2d6e7beb0731ae2be481715c94795657306d6013cc6d81fd60c4784a6ed" +source.sha256 = "ed5027cc37c5ba4f2b9a568528f5bb49deedccaaa60bd770311c7bface6aa02b" output.type = "zone" +output.intermediate_only = true # Refer to # https://github.com/oxidecomputer/propolis/blob/master/package/README.md diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index bc40187b38..bcd648cd2d 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -1708,11 +1708,15 @@ impl ServiceManager { let Some(info) = self.inner.sled_info.get() else { return Err(Error::SledAgentNotReady); }; - let datalink = installed_zone.get_control_vnic_name(); - let gateway = &info.underlay_address.to_string(); let listen_addr = &underlay_address.to_string(); let listen_port = &CRUCIBLE_PORT.to_string(); + let nw_setup_service = Self::zone_network_setup_install( + info, + &installed_zone, + listen_addr, + )?; + let dataset_name = DatasetName::new( dataset.pool_name.clone(), DatasetKind::Crucible, @@ -1720,8 +1724,6 @@ impl ServiceManager { .full_name(); let uuid = &Uuid::new_v4().to_string(); let config = PropertyGroupBuilder::new("config") - .add_property("datalink", "astring", datalink) - .add_property("gateway", "astring", gateway) .add_property("dataset", "astring", &dataset_name) .add_property("listen_addr", "astring", listen_addr) .add_property("listen_port", "astring", listen_port) @@ -1729,6 +1731,7 @@ impl ServiceManager { .add_property("store", "astring", "/data"); let profile = ProfileBuilder::new("omicron") + .add_service(nw_setup_service) .add_service(disabled_ssh_service) .add_service( ServiceBuilder::new("oxide/crucible/agent") @@ -1759,18 +1762,21 @@ impl ServiceManager { return Err(Error::SledAgentNotReady); }; - let datalink = installed_zone.get_control_vnic_name(); - let gateway = &info.underlay_address.to_string(); let listen_addr = &underlay_address.to_string(); let listen_port = &CRUCIBLE_PANTRY_PORT.to_string(); + let nw_setup_service = Self::zone_network_setup_install( + info, + &installed_zone, + listen_addr, + )?; + let config = PropertyGroupBuilder::new("config") - .add_property("datalink", "astring", datalink) - .add_property("gateway", "astring", gateway) .add_property("listen_addr", "astring", listen_addr) .add_property("listen_port", "astring", listen_port); let profile = ProfileBuilder::new("omicron") + .add_service(nw_setup_service) .add_service(disabled_ssh_service) .add_service( ServiceBuilder::new("oxide/crucible/pantry")