From 43fe427cf60268d38ab6422db610e0c516cb86b7 Mon Sep 17 00:00:00 2001 From: Matthew Yeazel Date: Thu, 11 Jul 2024 02:30:16 +0000 Subject: [PATCH 1/6] release: Update release.toml to 1.20.4 Signed-off-by: Matthew Yeazel (cherry picked from commit 5dc98b6ba1f59615706d7b6a1fe937d5dd15f493) --- Release.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Release.toml b/Release.toml index e7bdd063d22..8a3104901c3 100644 --- a/Release.toml +++ b/Release.toml @@ -315,10 +315,12 @@ version = "1.21.0" "(1.20.0, 1.20.1)" = [] "(1.20.1, 1.20.2)" = [] "(1.20.2, 1.20.3)" = [] -"(1.20.3, 1.21.0)" = [ +"(1.20.3, 1.20.4)" = [] +"(1.20.4, 1.21.0)" = [ "migrate_v1.21.0_pluto-remove-generators-v0-1-0.lz4", "migrate_v1.21.0_pod-infra-container-image-remove-settings-generator.lz4", "migrate_v1.21.0_pod-infra-container-image-affected-services.lz4", "migrate_v1.21.0_pod-infra-container-image-services.lz4", "migrate_v1.21.0_k8s-reserved-cpus-v0-1-0.lz4", ] + From d503840cdbbedb1ed759cf2b26792837c1f176b3 Mon Sep 17 00:00:00 2001 From: Yutong Sun Date: Thu, 25 Jul 2024 22:40:17 +0000 Subject: [PATCH 2/6] release: update Release.toml to 1.20.5 Signed-off-by: Yutong Sun --- Release.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Release.toml b/Release.toml index 8a3104901c3..6967cd9d91f 100644 --- a/Release.toml +++ b/Release.toml @@ -316,11 +316,11 @@ version = "1.21.0" "(1.20.1, 1.20.2)" = [] "(1.20.2, 1.20.3)" = [] "(1.20.3, 1.20.4)" = [] -"(1.20.4, 1.21.0)" = [ +"(1.20.4, 1.20.5)" = [] +"(1.20.5, 1.21.0)" = [ "migrate_v1.21.0_pluto-remove-generators-v0-1-0.lz4", "migrate_v1.21.0_pod-infra-container-image-remove-settings-generator.lz4", "migrate_v1.21.0_pod-infra-container-image-affected-services.lz4", "migrate_v1.21.0_pod-infra-container-image-services.lz4", "migrate_v1.21.0_k8s-reserved-cpus-v0-1-0.lz4", -] - +] \ No newline at end of file From 482d213931378129db391b441f604378e9f2412d Mon Sep 17 00:00:00 2001 From: Yutong Sun Date: Thu, 25 Jul 2024 22:33:34 +0000 Subject: [PATCH 3/6] host-containers: update admin container to v0.11.9 Signed-off-by: Yutong Sun --- sources/shared-defaults/aws-host-containers.toml | 2 +- sources/shared-defaults/public-host-containers.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/shared-defaults/aws-host-containers.toml b/sources/shared-defaults/aws-host-containers.toml index bbc175bbefe..d5926a0eeb5 100644 --- a/sources/shared-defaults/aws-host-containers.toml +++ b/sources/shared-defaults/aws-host-containers.toml @@ -3,7 +3,7 @@ enabled = false superpowered = true [metadata.settings.host-containers.admin.source] -setting-generator = "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-admin:v0.11.8'" +setting-generator = "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-admin:v0.11.9'" [metadata.settings.host-containers.admin.user-data] setting-generator = "shibaken generate-admin-userdata" diff --git a/sources/shared-defaults/public-host-containers.toml b/sources/shared-defaults/public-host-containers.toml index 1205f388461..d0781998ff8 100644 --- a/sources/shared-defaults/public-host-containers.toml +++ b/sources/shared-defaults/public-host-containers.toml @@ -6,7 +6,7 @@ [settings.host-containers.admin] enabled = false superpowered = true -source = "public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.8" +source = "public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.9" [settings.host-containers.control] enabled = false From 841448d6e571771109013f8b614f38983ad145d7 Mon Sep 17 00:00:00 2001 From: Yutong Sun Date: Thu, 25 Jul 2024 22:35:26 +0000 Subject: [PATCH 4/6] host-containers: update control container to v0.7.13 Signed-off-by: Yutong Sun --- sources/shared-defaults/aws-host-containers.toml | 2 +- sources/shared-defaults/public-host-containers.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/shared-defaults/aws-host-containers.toml b/sources/shared-defaults/aws-host-containers.toml index d5926a0eeb5..d58f3ae1f31 100644 --- a/sources/shared-defaults/aws-host-containers.toml +++ b/sources/shared-defaults/aws-host-containers.toml @@ -13,4 +13,4 @@ enabled = true superpowered = false [metadata.settings.host-containers.control.source] -setting-generator = "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-control:v0.7.12'" +setting-generator = "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-control:v0.7.13'" diff --git a/sources/shared-defaults/public-host-containers.toml b/sources/shared-defaults/public-host-containers.toml index d0781998ff8..fc12119ec1c 100644 --- a/sources/shared-defaults/public-host-containers.toml +++ b/sources/shared-defaults/public-host-containers.toml @@ -11,4 +11,4 @@ source = "public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.9" [settings.host-containers.control] enabled = false superpowered = false -source = "public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.12" +source = "public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.13" From 7ad8ae5db4b8a84500af0b523e0105e694cc5531 Mon Sep 17 00:00:00 2001 From: Yutong Sun Date: Thu, 25 Jul 2024 23:24:21 +0000 Subject: [PATCH 5/6] migrations: migrate to admin container v0.11.9 Signed-off-by: Yutong Sun --- Release.toml | 7 +++-- .../aws-admin-container-v0-11-9/Cargo.toml | 15 +++++++++++ .../aws-admin-container-v0-11-9/src/main.rs | 27 +++++++++++++++++++ .../public-admin-container-v0-11-9/Cargo.toml | 15 +++++++++++ .../src/main.rs | 25 +++++++++++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/Cargo.toml create mode 100644 sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/src/main.rs create mode 100644 sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/Cargo.toml create mode 100644 sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/src/main.rs diff --git a/Release.toml b/Release.toml index 6967cd9d91f..365c49ef651 100644 --- a/Release.toml +++ b/Release.toml @@ -316,11 +316,14 @@ version = "1.21.0" "(1.20.1, 1.20.2)" = [] "(1.20.2, 1.20.3)" = [] "(1.20.3, 1.20.4)" = [] -"(1.20.4, 1.20.5)" = [] +"(1.20.4, 1.20.5)" = [ + "migrate_v1.20.5_aws-admin-container-v0-11-9.lz4", + "migrate_v1.20.5_public-admin-container-v0-11-9.lz4", +] "(1.20.5, 1.21.0)" = [ "migrate_v1.21.0_pluto-remove-generators-v0-1-0.lz4", "migrate_v1.21.0_pod-infra-container-image-remove-settings-generator.lz4", "migrate_v1.21.0_pod-infra-container-image-affected-services.lz4", "migrate_v1.21.0_pod-infra-container-image-services.lz4", "migrate_v1.21.0_k8s-reserved-cpus-v0-1-0.lz4", -] \ No newline at end of file +] diff --git a/sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/Cargo.toml b/sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/Cargo.toml new file mode 100644 index 00000000000..52e394bad58 --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "aws-admin-container-v0-11-9" +version = "0.1.0" +authors = ["Yutong Sun "] +license = "Apache-2.0 OR MIT" +edition = "2021" +publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] + + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +migration-helpers = { path = "../../../migration-helpers", version = "0.1.0"} diff --git a/sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/src/main.rs b/sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/src/main.rs new file mode 100644 index 00000000000..cd345ce752e --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/aws-admin-container-v0-11-9/src/main.rs @@ -0,0 +1,27 @@ +use migration_helpers::common_migrations::ReplaceSchnauzerMigration; +use migration_helpers::{migrate, Result}; +use std::process; + +const OLD_ADMIN_CTR_CMDLINE: &str = + "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-admin:v0.11.8'"; +const NEW_ADMIN_CTR_CMDLINE: &str = + "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-admin:v0.11.9'"; + +/// We bumped the version of the default admin container +fn run() -> Result<()> { + migrate(ReplaceSchnauzerMigration { + setting: "settings.host-containers.admin.source", + old_schnauzer_cmdline: OLD_ADMIN_CTR_CMDLINE, + new_schnauzer_cmdline: NEW_ADMIN_CTR_CMDLINE, + }) +} + +// Returning a Result from main makes it print a Debug representation of the error, but with Snafu +// we have nice Display representations of the error, so we wrap "main" (run) and print any error. +// https://github.com/shepmaster/snafu/issues/110 +fn main() { + if let Err(e) = run() { + eprintln!("{}", e); + process::exit(1); + } +} diff --git a/sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/Cargo.toml b/sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/Cargo.toml new file mode 100644 index 00000000000..a8ee610e263 --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "public-admin-container-v0-11-9" +version = "0.1.0" +authors = ["Yutong Sun "] +license = "Apache-2.0 OR MIT" +edition = "2021" +publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] + + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +migration-helpers = { path = "../../../migration-helpers", version = "0.1.0"} diff --git a/sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/src/main.rs b/sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/src/main.rs new file mode 100644 index 00000000000..4f8d01fba41 --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/public-admin-container-v0-11-9/src/main.rs @@ -0,0 +1,25 @@ +use migration_helpers::common_migrations::ReplaceStringMigration; +use migration_helpers::{migrate, Result}; +use std::process; + +const OLD_ADMIN_CTR_SOURCE_VAL: &str = "public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.8"; +const NEW_ADMIN_CTR_SOURCE_VAL: &str = "public.ecr.aws/bottlerocket/bottlerocket-admin:v0.11.9"; + +/// We bumped the version of the default admin container +fn run() -> Result<()> { + migrate(ReplaceStringMigration { + setting: "settings.host-containers.admin.source", + old_val: OLD_ADMIN_CTR_SOURCE_VAL, + new_val: NEW_ADMIN_CTR_SOURCE_VAL, + }) +} + +// Returning a Result from main makes it print a Debug representation of the error, but with Snafu +// we have nice Display representations of the error, so we wrap "main" (run) and print any error. +// https://github.com/shepmaster/snafu/issues/110 +fn main() { + if let Err(e) = run() { + eprintln!("{}", e); + process::exit(1); + } +} From 34f8a2e818f7ab6340058b32901648dab06e3cfb Mon Sep 17 00:00:00 2001 From: Yutong Sun Date: Thu, 25 Jul 2024 23:26:11 +0000 Subject: [PATCH 6/6] migrations: migrate to control container v0.7.13 Signed-off-by: Yutong Sun --- Release.toml | 2 ++ .../aws-control-container-v0-7-13/Cargo.toml | 15 +++++++++++ .../aws-control-container-v0-7-13/src/main.rs | 27 +++++++++++++++++++ .../Cargo.toml | 15 +++++++++++ .../src/main.rs | 25 +++++++++++++++++ 5 files changed, 84 insertions(+) create mode 100644 sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/Cargo.toml create mode 100644 sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/src/main.rs create mode 100644 sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/Cargo.toml create mode 100644 sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/src/main.rs diff --git a/Release.toml b/Release.toml index 365c49ef651..f20b0b9ad99 100644 --- a/Release.toml +++ b/Release.toml @@ -319,6 +319,8 @@ version = "1.21.0" "(1.20.4, 1.20.5)" = [ "migrate_v1.20.5_aws-admin-container-v0-11-9.lz4", "migrate_v1.20.5_public-admin-container-v0-11-9.lz4", + "migrate_v1.20.5_aws-control-container-v0-7-13.lz4", + "migrate_v1.20.5_public-control-container-v0-7-13.lz4", ] "(1.20.5, 1.21.0)" = [ "migrate_v1.21.0_pluto-remove-generators-v0-1-0.lz4", diff --git a/sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/Cargo.toml b/sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/Cargo.toml new file mode 100644 index 00000000000..59a214dff4c --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "aws-control-container-v0-7-13" +version = "0.1.0" +authors = ["Yutong Sun "] +license = "Apache-2.0 OR MIT" +edition = "2021" +publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] + + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +migration-helpers = { path = "../../../migration-helpers", version = "0.1.0"} diff --git a/sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/src/main.rs b/sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/src/main.rs new file mode 100644 index 00000000000..efb9d222225 --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/aws-control-container-v0-7-13/src/main.rs @@ -0,0 +1,27 @@ +use migration_helpers::common_migrations::ReplaceSchnauzerMigration; +use migration_helpers::{migrate, Result}; +use std::process; + +const OLD_CONTROL_CTR_CMDLINE: &str = + "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-control:v0.7.12'"; +const NEW_CONTROL_CTR_CMDLINE: &str = + "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-control:v0.7.13'"; + +/// We bumped the version of the default control container +fn run() -> Result<()> { + migrate(ReplaceSchnauzerMigration { + setting: "settings.host-containers.control.source", + old_schnauzer_cmdline: OLD_CONTROL_CTR_CMDLINE, + new_schnauzer_cmdline: NEW_CONTROL_CTR_CMDLINE, + }) +} + +// Returning a Result from main makes it print a Debug representation of the error, but with Snafu +// we have nice Display representations of the error, so we wrap "main" (run) and print any error. +// https://github.com/shepmaster/snafu/issues/110 +fn main() { + if let Err(e) = run() { + eprintln!("{}", e); + process::exit(1); + } +} diff --git a/sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/Cargo.toml b/sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/Cargo.toml new file mode 100644 index 00000000000..29bd1e5228a --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "public-control-container-v0-7-13" +version = "0.1.0" +authors = ["Yutong Sun "] +license = "Apache-2.0 OR MIT" +edition = "2021" +publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] + + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +migration-helpers = { path = "../../../migration-helpers", version = "0.1.0"} diff --git a/sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/src/main.rs b/sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/src/main.rs new file mode 100644 index 00000000000..2ed92aaec82 --- /dev/null +++ b/sources/settings-migrations/archived/v1.20.5/public-control-container-v0-7-13/src/main.rs @@ -0,0 +1,25 @@ +use migration_helpers::common_migrations::ReplaceStringMigration; +use migration_helpers::{migrate, Result}; +use std::process; + +const OLD_CONTROL_CTR_SOURCE_VAL: &str = "public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.12"; +const NEW_CONTROL_CTR_SOURCE_VAL: &str = "public.ecr.aws/bottlerocket/bottlerocket-control:v0.7.13"; + +/// We bumped the version of the default control container +fn run() -> Result<()> { + migrate(ReplaceStringMigration { + setting: "settings.host-containers.control.source", + old_val: OLD_CONTROL_CTR_SOURCE_VAL, + new_val: NEW_CONTROL_CTR_SOURCE_VAL, + }) +} + +// Returning a Result from main makes it print a Debug representation of the error, but with Snafu +// we have nice Display representations of the error, so we wrap "main" (run) and print any error. +// https://github.com/shepmaster/snafu/issues/110 +fn main() { + if let Err(e) = run() { + eprintln!("{}", e); + process::exit(1); + } +}