-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support docker engine 25.x #4075
Conversation
8b2bb71
to
9076d31
Compare
712745e
to
2e6eb57
Compare
763e5ab
to
8a8fb1f
Compare
c36132a
to
62708fd
Compare
@@ -1097,26 +1097,24 @@ func (agent *ecsAgent) startACSSession( | |||
return exitcodes.ExitSuccess | |||
} | |||
|
|||
// validateRequiredVersion validates docker version. | |||
// verifyRequiredDockerVersion validates docker version. | |||
// Minimum docker version supported is 1.9.0, maps to api version 1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit - should probably update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This minimum version has actually not changed on Linux, so we should be good to leave this here
- adds support for docker engine 25+, which has deprecated docker API versions less than 1.24. - dynamically determines which docker versions are available and what to use to call docker API, as well as advertising correct version support capabilities to the ECS backend
62708fd
to
b2c24a0
Compare
Any prediction on when a new version with this fix will be released? |
@raphael5178 Please see comment 1906827813. |
@raphael5178 sorry missed updating this PR, this has now been released in agent version 1.81.0 |
@sparrc no problem my friend, thanks :) |
This "fix" broke the ECS agent for the entire cluster when using Flatcar Container Linux running Docker 24 on all stable, beta and alpha update trains; we have since downgraded the agent to an explicit 1.80.0 version until further notice. Can you please lmk if there's a workaround to the following issue arising when running any ECS agent version gte 1.81.0:
I can replicate this on all build trains for flatcar; I don't think the container is respecting any API-version related env vars as we tried 1) configuring them on a systemd level, 2) on a docker level, 3) on the ecs.config level; neither worked and left the cluster in an unoperable state. Please advise asap. |
Summary
Since the release of docker engine 25.x (Jan 19 2024), the docker engine no longer supports API versions less than 1.24. See deprecated API versions here: https://docs.docker.com/engine/api/#deprecated-api-versions
This issue would show up in the agent logs like:
docker-remote-api.1.19
. Since some tasks will have these attributes added to them, we need to advertise that we support this remote API version even though technically it is deprecated and we no longer support it. Although we don't support using the specific API version, we still should be able to support all functionality from that version in the minimum docker API version.fixes aws/containers-roadmap#2267
fixes #4074
NOTE: Our minimum docker engine version supported is moving from 1.9.0 to 1.12.0, which maps to api version 1.24. Docker API versions prior to 1.24 are deprecated as of Jan 2024. See https://docs.docker.com/engine/api/#deprecated-api-versions.Docker version 1.12 was released in 2016 and is not supported in Amazon Linux.Details
After this change, we will check all versions of the Docker API on startup, and then set agent's minimum/default version to whatever is the minimum supported. So when starting up on Docker 25.x we see log messages like this appear:
deprecated api versions fail (info-level messages)
minimum api version is bumped from 1.21 to 1.24:
while 1.17-1.23 are not directly supported, they are supported in "extended" versions in order to advertise to the ECS backend that we support features added in these versions (such as awslogs added in API version 1.19):
Testing
unit and functional tests
Description for the changelog
Bug: Fix ECS agent docker API failures on docker engine 25.x
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.