Version: 20260408
After running the latest release tag 20260408 I noticed that the amazon-ecs-ami build succeeded but our following pipelines started to fail. This was the first time this was happening and I started to investigate why. During the investigation I noticed that the latest(20260408) release tag has source_ami_al2023=al2023-ami-minimal-2023.10.20260330.0-kernel-6.1-x86_64 but after launching an EC2 instance from the created ami I found out that the actual version running was 2023.11.20260406.
This is probably related to using sudo dnf update -y --releasever=latest in the build script.
|
provisioner "shell" { |
|
inline_shebang = "/bin/sh -ex" |
|
inline = [ |
|
"sudo dnf update -y --releasever=latest" |
|
] |
|
} |
Logs from running the make al2023 from the release 20260408
amazon-ebs.al2023: + sudo dnf update -y --releasever=latest
amazon-ebs.al2023: Amazon Linux 2023 repository 66 MB/s | 58 MB 00:00
amazon-ebs.al2023: Amazon Linux 2023 Kernel Livepatch repository 209 kB/s | 31 kB 00:00
amazon-ebs.al2023: Dependencies resolved.
amazon-ebs.al2023: ================================================================================
amazon-ebs.al2023: Package Arch Version Repository Size
amazon-ebs.al2023: ================================================================================
amazon-ebs.al2023: Upgrading:
amazon-ebs.al2023: amazon-linux-repo-s3 noarch 2023.11.20260406-0.amzn2023 amazonlinux 15 k
amazon-ebs.al2023: kernel-livepatch-repo-s3 noarch 2023.11.20260406-0.amzn2023 amazonlinux 15 k
amazon-ebs.al2023: system-release noarch 2023.11.20260406-0.amzn2023 amazonlinux 27 k
amazon-ebs.al2023:
amazon-ebs.al2023: Transaction Summary
amazon-ebs.al2023: ================================================================================
amazon-ebs.al2023: Upgrade 3 Packages
amazon-ebs.al2023:
amazon-ebs.al2023: Total download size: 57 k
amazon-ebs.al2023: Downloading Packages:
amazon-ebs.al2023: (1/3): amazon-linux-repo-s3-2023.11.20260406-0. 416 kB/s | 15 kB 00:00
amazon-ebs.al2023: (2/3): kernel-livepatch-repo-s3-2023.11.2026040 382 kB/s | 15 kB 00:00
amazon-ebs.al2023: (3/3): system-release-2023.11.20260406-0.amzn20 623 kB/s | 27 kB 00:00
amazon-ebs.al2023: --------------------------------------------------------------------------------
amazon-ebs.al2023: Total 683 kB/s | 57 kB 00:00
amazon-ebs.al2023: Running transaction check
amazon-ebs.al2023: Transaction check succeeded.
amazon-ebs.al2023: Running transaction test
amazon-ebs.al2023: Transaction test succeeded.
amazon-ebs.al2023: Running transaction
amazon-ebs.al2023: Preparing : 1/1
amazon-ebs.al2023: Upgrading : kernel-livepatch-repo-s3-2023.11.20260406-0.amzn2023 1/6
amazon-ebs.al2023: Upgrading : system-release-2023.11.20260406-0.amzn2023.noarch 2/6
amazon-ebs.al2023: Upgrading : amazon-linux-repo-s3-2023.11.20260406-0.amzn2023.noa 3/6
amazon-ebs.al2023: Cleanup : kernel-livepatch-repo-s3-2023.10.20260330-0.amzn2023 4/6
amazon-ebs.al2023: Cleanup : system-release-2023.10.20260330-0.amzn2023.noarch 5/6
amazon-ebs.al2023: Cleanup : amazon-linux-repo-s3-2023.10.20260330-0.amzn2023.noa 6/6
amazon-ebs.al2023: Running scriptlet: amazon-linux-repo-s3-2023.10.20260330-0.amzn2023.noa 6/6
amazon-ebs.al2023: Verifying : amazon-linux-repo-s3-2023.11.20260406-0.amzn2023.noa 1/6
amazon-ebs.al2023: Verifying : amazon-linux-repo-s3-2023.10.20260330-0.amzn2023.noa 2/6
amazon-ebs.al2023: Verifying : kernel-livepatch-repo-s3-2023.11.20260406-0.amzn2023 3/6
amazon-ebs.al2023: Verifying : kernel-livepatch-repo-s3-2023.10.20260330-0.amzn2023 4/6
amazon-ebs.al2023: Verifying : system-release-2023.11.20260406-0.amzn2023.noarch 5/6
amazon-ebs.al2023: Verifying : system-release-2023.10.20260330-0.amzn2023.noarch 6/6
amazon-ebs.al2023:
amazon-ebs.al2023: Upgraded:
amazon-ebs.al2023: amazon-linux-repo-s3-2023.11.20260406-0.amzn2023.noarch
amazon-ebs.al2023: kernel-livepatch-repo-s3-2023.11.20260406-0.amzn2023.noarch
amazon-ebs.al2023: system-release-2023.11.20260406-0.amzn2023.noarch
amazon-ebs.al2023:
amazon-ebs.al2023: Complete!
So the latest was not 2023.10.20260330.0 at the time the build ran. The release was done at 7.4.2026 9:16pm GMT+3 and we created the AMI at 8.4.2026 1:53pm.
Also the local.ami_name_al2023 is named wrong as it has the static -hvm-2023.0. part in it so the name does not get updated with the major version.
|
ami_name_al2023 = "${var.ami_name_prefix_al2023}-hvm-2023.0.${var.ami_version_al2023}${var.kernel_version_al2023}-x86_64" |
Version: 20260408
After running the latest release tag
20260408I noticed that the amazon-ecs-ami build succeeded but our following pipelines started to fail. This was the first time this was happening and I started to investigate why. During the investigation I noticed that the latest(20260408) release tag hassource_ami_al2023=al2023-ami-minimal-2023.10.20260330.0-kernel-6.1-x86_64but after launching an EC2 instance from the created ami I found out that the actual version running was2023.11.20260406.This is probably related to using
sudo dnf update -y --releasever=latestin the build script.amazon-ecs-ami/al2023.pkr.hcl
Lines 89 to 94 in eb80a9f
Logs from running the make al2023 from the release 20260408
So the latest was not
2023.10.20260330.0at the time the build ran. The release was done at 7.4.2026 9:16pm GMT+3 and we created the AMI at 8.4.2026 1:53pm.Also the
local.ami_name_al2023is named wrong as it has the static-hvm-2023.0.part in it so the name does not get updated with the major version.amazon-ecs-ami/al2023.pkr.hcl
Line 2 in eb80a9f