Closed yongzhang closed 2 months ago
Hi @yongzhang , Thank you for reaching out! This is the expected behavior on AL2 instances, since docker 25 is a security update.
If you'd like to disable security updates at launch, please refer to this Amazon Linux FAQ. (search for Q: How do I disable the automatic installation of critical and important security updates on initial launch?
).
To further help ECS customers from running into surprises, ECS AMIs beginning June 12, 2024 have the security updates-at-boot feature disabled by default: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html#ecs-optimized-AMI-security-changes
Please let us know if you have further questions. Thanks!
@singholt
I can still find this in newer versions of AMI:
repo_upgrade: security
EDITTED:
Ok, I found the overriden in cloud.cfg.d
:
# cat 90_ecs.cfg
#cloud-config
repo_upgrade: none
system_info:
default_user:
groups: [ "wheel", "docker" ]
Cool! Thanks.
Summary
We expericed a big issue that EC2 instances cannot join ECS cluster because of docker verison upgrades when new instances launched.
Description
We run ECS optimized AMI with docker version 20.x and ecs-agent 1.82.x, e.g. amzn2-ami-ecs-hvm-2.0.20240328-x86_64-ebs.
We can see docker upgraded to
25.x
at startup:We checked cloud-init logs and found this:
/var/log/cloud-init-output.log
:^ This confirmed docker was upgraded to 25.x.
/var/log/cloud-init.log
:/etc/cloud/cloud.cfg
:So it seems like either docker was upgraded by cloud-init directly or upgraded as dependencies by other packages.
In the other word, even docker version was installed by a specific version in the AMI, like this, but docker version can still be upgraded to break things.
Expected Behavior
Observed Behavior
Environment Details
Supporting Log Snippets