Closed kjkuan closed 3 years ago
Thanks for reporting this, we've released an updated AMI, amzn2-ami-ecs-hvm-2.0.20201125-x86_64-ebs, which contains the fix for this issue. Please let us know if you're still hitting this issue with the updated AMI.
Thanks @ellenthsu We willl give that a try. Just curious, is there a place where I can see the release notes with a summary of changes between the releases for the ECS optimized AMIs?
@kjkuan the release pages along with AWS doc should provide the information: https://github.com/aws/amazon-ecs-agent/releases https://github.com/aws/amazon-ecs-init/releases https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-ami-versions.html
The issue hasn't happened since we switched to the new AMI. Thanks! Closing this issue.
Summary
ECS service doesn't always run at boot time due to systemd breaking service ordering cycles
Description
Not sure if this is the right place to report this, but we've found that at least with amzn2-ami-ecs-hvm-2.0.20201119-x86_64-ebs, there appears to be some service ordering cycles, which systemd tries to break by removing a dependency (e.g., sometimes
rpcbind.socket
ordocker.socket
), which leads to Docker and the ECS services not being started due to the missing dependency.You can see such behavior in action by running this command several times and observing the output:
Below is the actual logs taken from
journalctl -x
run on an instance that failed to join an ECS cluster because no Docker nor ECS agent were running after boot:Expected Behavior
ECS agent should be running after instance boot.
Observed Behavior
See description.
Environment Details
EC2 instance running AMI: amzn2-ami-ecs-hvm-2.0.20201119-x86_64-ebs
Supporting Log Snippets