From 62cdd7c32c6fc2f84969fe1ab66ff47fe832101b Mon Sep 17 00:00:00 2001 From: karencfv Date: Tue, 30 Jan 2024 17:27:39 +1300 Subject: [PATCH 1/8] Create composite crucible and pantry packages --- .github/buildomat/jobs/package.sh | 4 ++-- package-manifest.toml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/buildomat/jobs/package.sh b/.github/buildomat/jobs/package.sh index 79590a44df..f918a5768c 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 c34b84eb9d..633915f89c 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -389,6 +389,21 @@ source.packages = [ "sp-sim.tar.gz" ] output.type = "zone" output.intermediate_only = true +[package.crucible-zone] +service_name = "crucible-zone" +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_zone" +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 @@ -410,6 +425,7 @@ source.commit = "2d4bc11232d53f177c286383926fa5f8c1b2a938" # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible.sha256.txt source.sha256 = "88ec93657a644e8f10a32d1d22cc027db901aea81027f49ce7bee58fc4a35755" output.type = "zone" +output.intermediate_only = true [package.crucible-pantry] service_name = "crucible_pantry" @@ -421,6 +437,7 @@ source.commit = "2d4bc11232d53f177c286383926fa5f8c1b2a938" # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible-pantry.sha256.txt source.sha256 = "e2c3ed2d4cd6b5da3d38dd52df6d4a259280be7d45c30a363e9c71b174ecc6f8" output.type = "zone" +output.intermediate_only = true # Refer to # https://github.com/oxidecomputer/propolis/blob/master/package/README.md From b554d99a1e62f27c5d350997c8b666b5dfaf606a Mon Sep 17 00:00:00 2001 From: karencfv Date: Thu, 8 Feb 2024 10:05:13 +1300 Subject: [PATCH 2/8] for testing only --- package-manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 633915f89c..2e2674fb6b 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -418,7 +418,7 @@ only_for_targets.image = "standard" # 1. Build the zone image manually # 2. Copy the output zone image from crucible/out to omicron/out # 3. Use source.type = "manual" instead of "prebuilt" -source.type = "prebuilt" +source.type = "manual" source.repo = "crucible" source.commit = "2d4bc11232d53f177c286383926fa5f8c1b2a938" # The SHA256 digest is automatically posted to: @@ -430,7 +430,7 @@ output.intermediate_only = true [package.crucible-pantry] service_name = "crucible_pantry" only_for_targets.image = "standard" -source.type = "prebuilt" +source.type = "manual" source.repo = "crucible" source.commit = "2d4bc11232d53f177c286383926fa5f8c1b2a938" # The SHA256 digest is automatically posted to: From 3ff45e9d8ae9003d929962e8452998020bcb4ba1 Mon Sep 17 00:00:00 2001 From: karencfv Date: Fri, 9 Feb 2024 14:38:04 +1300 Subject: [PATCH 3/8] Test using images from my branch --- package-manifest.toml | 12 ++++++------ smf/sled-agent/non-gimlet/config.toml | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 2e2674fb6b..65ea832f4f 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -418,24 +418,24 @@ only_for_targets.image = "standard" # 1. Build the zone image manually # 2. Copy the output zone image from crucible/out to omicron/out # 3. Use source.type = "manual" instead of "prebuilt" -source.type = "manual" +source.type = "prebuilt" source.repo = "crucible" -source.commit = "2d4bc11232d53f177c286383926fa5f8c1b2a938" +source.commit = "3e2bd7c5f79b59c66d848a6c19042394c28616ff" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible.sha256.txt -source.sha256 = "88ec93657a644e8f10a32d1d22cc027db901aea81027f49ce7bee58fc4a35755" +source.sha256 = "172c3ad4cbb836d6ef9af8d50a52eb6bc5fe7dad589b880c71a93bf9867a6188" output.type = "zone" output.intermediate_only = true [package.crucible-pantry] service_name = "crucible_pantry" only_for_targets.image = "standard" -source.type = "manual" +source.type = "prebuilt" source.repo = "crucible" -source.commit = "2d4bc11232d53f177c286383926fa5f8c1b2a938" +source.commit = "3e2bd7c5f79b59c66d848a6c19042394c28616ff" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible-pantry.sha256.txt -source.sha256 = "e2c3ed2d4cd6b5da3d38dd52df6d4a259280be7d45c30a363e9c71b174ecc6f8" +source.sha256 = "6a90cb0e3198cc2578aa2f4aa75016fed8f25511ccd0965f1bf7e8872c156616" output.type = "zone" output.intermediate_only = true diff --git a/smf/sled-agent/non-gimlet/config.toml b/smf/sled-agent/non-gimlet/config.toml index 432652c50b..2206c1eef8 100644 --- a/smf/sled-agent/non-gimlet/config.toml +++ b/smf/sled-agent/non-gimlet/config.toml @@ -16,7 +16,8 @@ sidecar_revision.soft_zone = { front_port_count = 1, rear_port_count = 1 } # Setting this to true causes sled-agent to always report that its time is # in-sync, rather than querying its NTP zone. -skip_timesync = false +# TODO: DON'T FORGET TO SET BACK TO FALSE BEFORE MERGING +skip_timesync = true # For testing purposes, A file-backed zpool can be manually created with the # following: From 2f790f47de8b5bb7f7e172620e800162631bb587 Mon Sep 17 00:00:00 2001 From: karencfv Date: Mon, 12 Feb 2024 12:39:03 +1300 Subject: [PATCH 4/8] Service name must be same as zone --- package-manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index a195a0c11b..2c38057fd9 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -390,7 +390,7 @@ output.type = "zone" output.intermediate_only = true [package.crucible-zone] -service_name = "crucible-zone" +service_name = "crucible" only_for_targets.image = "standard" source.type = "composite" source.packages = [ "crucible.tar.gz", "zone-network-setup.tar.gz" ] @@ -398,7 +398,7 @@ output.type = "zone" [package.crucible-pantry-zone] -service_name = "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" ] @@ -410,7 +410,7 @@ output.type = "zone" # 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): @@ -428,7 +428,7 @@ 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" From 7d9fca0c0655833a3c5ef6a20d69da1d8c51eb79 Mon Sep 17 00:00:00 2001 From: karencfv Date: Mon, 12 Feb 2024 14:28:41 +1300 Subject: [PATCH 5/8] Actually add the networking service --- sled-agent/src/services.rs | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index bc40187b38..fe24c4f624 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") From 014ba339485804a1a591f64eb7d6078b91ad0f9e Mon Sep 17 00:00:00 2001 From: karencfv Date: Mon, 12 Feb 2024 19:26:05 +1300 Subject: [PATCH 6/8] fmt and update to latest crucible build from PR branch --- package-manifest.toml | 8 ++++---- sled-agent/src/services.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 2c38057fd9..97c573b9a4 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -420,10 +420,10 @@ only_for_targets.image = "standard" # 3. Use source.type = "manual" instead of "prebuilt" source.type = "prebuilt" source.repo = "crucible" -source.commit = "3e2bd7c5f79b59c66d848a6c19042394c28616ff" +source.commit = "9f74bb5fe2be09de9f7a47f2db64d7dce836b79c" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible.sha256.txt -source.sha256 = "172c3ad4cbb836d6ef9af8d50a52eb6bc5fe7dad589b880c71a93bf9867a6188" +source.sha256 = "37e6c8b5cde1943e36950eae7b8a56dc31c18e5c339244e2582039f1518fec05" output.type = "zone" output.intermediate_only = true @@ -432,10 +432,10 @@ service_name = "crucible_pantry_prebuilt" only_for_targets.image = "standard" source.type = "prebuilt" source.repo = "crucible" -source.commit = "3e2bd7c5f79b59c66d848a6c19042394c28616ff" +source.commit = "9f74bb5fe2be09de9f7a47f2db64d7dce836b79c" # The SHA256 digest is automatically posted to: # https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image//crucible-pantry.sha256.txt -source.sha256 = "6a90cb0e3198cc2578aa2f4aa75016fed8f25511ccd0965f1bf7e8872c156616" +source.sha256 = "2fa1f6295d60f2a311b698452286b63718b75b0c423b0cb267b0ccbda6e5ddf9" output.type = "zone" output.intermediate_only = true diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index fe24c4f624..bcd648cd2d 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -1776,7 +1776,7 @@ impl ServiceManager { .add_property("listen_port", "astring", listen_port); let profile = ProfileBuilder::new("omicron") - .add_service(nw_setup_service) + .add_service(nw_setup_service) .add_service(disabled_ssh_service) .add_service( ServiceBuilder::new("oxide/crucible/pantry") From 6bb03f7d85ac56fe65c343b1f1c06fc8c1fc822e Mon Sep 17 00:00:00 2001 From: karencfv Date: Wed, 21 Feb 2024 12:48:39 +1300 Subject: [PATCH 7/8] Update to fe0c5c79 --- package-manifest.toml | 8 ++++---- smf/sled-agent/non-gimlet/config.toml | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 9f356697ef..bb66fd6ea5 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -420,10 +420,10 @@ only_for_targets.image = "standard" # 3. Use source.type = "manual" instead of "prebuilt" source.type = "prebuilt" source.repo = "crucible" -source.commit = "9f74bb5fe2be09de9f7a47f2db64d7dce836b79c" +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 = "37e6c8b5cde1943e36950eae7b8a56dc31c18e5c339244e2582039f1518fec05" +source.sha256 = "5da4f93b16fc7c0f3cc3a67919dbaa3f143cc07b703183a236f5c98b61504d15" output.type = "zone" output.intermediate_only = true @@ -432,10 +432,10 @@ service_name = "crucible_pantry_prebuilt" only_for_targets.image = "standard" source.type = "prebuilt" source.repo = "crucible" -source.commit = "9f74bb5fe2be09de9f7a47f2db64d7dce836b79c" +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 = "2fa1f6295d60f2a311b698452286b63718b75b0c423b0cb267b0ccbda6e5ddf9" +source.sha256 = "ed5027cc37c5ba4f2b9a568528f5bb49deedccaaa60bd770311c7bface6aa02b" output.type = "zone" output.intermediate_only = true diff --git a/smf/sled-agent/non-gimlet/config.toml b/smf/sled-agent/non-gimlet/config.toml index 2206c1eef8..432652c50b 100644 --- a/smf/sled-agent/non-gimlet/config.toml +++ b/smf/sled-agent/non-gimlet/config.toml @@ -16,8 +16,7 @@ sidecar_revision.soft_zone = { front_port_count = 1, rear_port_count = 1 } # Setting this to true causes sled-agent to always report that its time is # in-sync, rather than querying its NTP zone. -# TODO: DON'T FORGET TO SET BACK TO FALSE BEFORE MERGING -skip_timesync = true +skip_timesync = false # For testing purposes, A file-backed zpool can be manually created with the # following: From 8ba348d1d3bb973a6dd6fd810a14b756837826b2 Mon Sep 17 00:00:00 2001 From: karencfv Date: Wed, 21 Feb 2024 13:15:16 +1300 Subject: [PATCH 8/8] address comment --- package-manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-manifest.toml b/package-manifest.toml index bb66fd6ea5..d7f42794ee 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -410,7 +410,7 @@ output.type = "zone" # https://github.com/oxidecomputer/crucible/blob/main/package/README.md # for instructions on building this manually. [package.crucible] -service_name = "crucible-prebuilt" +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):