-
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
engine/dockerclient: Add new DockerClient version support #996
Conversation
agent/app/agent_capability.go
Outdated
@@ -63,7 +66,12 @@ func (agent *ecsAgent) capabilities() []*ecs.Attribute { | |||
// Determine API versions to report as supported. Supported versions are also used for capability-enablement, except | |||
// logging drivers. | |||
for _, version := range agent.dockerClient.SupportedVersions() { | |||
capabilities = appendNameOnlyAttribute(capabilities, capabilityPrefix+"docker-remote-api."+string(version)) | |||
dockerVersion, _ := strconv.ParseFloat(string(version), 64) | |||
if dockerVersion >= dockerVersionUsingNewCapabilityPrefix { |
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.
Why are we doing 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.
I believe the new agent capabilities have the "ecs.capability" prefix. Shouldn't we maintain the same for new remote api versions too?
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.
I think we should leave all the api version capabilities consistent with each other.
agent/app/agent_capability.go
Outdated
@@ -63,7 +66,12 @@ func (agent *ecsAgent) capabilities() []*ecs.Attribute { | |||
// Determine API versions to report as supported. Supported versions are also used for capability-enablement, except | |||
// logging drivers. | |||
for _, version := range agent.dockerClient.SupportedVersions() { | |||
capabilities = appendNameOnlyAttribute(capabilities, capabilityPrefix+"docker-remote-api."+string(version)) | |||
dockerVersion, _ := strconv.ParseFloat(string(version), 64) |
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.
We should probably not parse this as a float. 1.2 is not greater than 1.11.
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.
aah yes, will change it.
0430a03
to
64cbcbe
Compare
Have you verified that the vendored copy of go-dockerclient has all known fields for API version 1.25 in the |
Yes, it does have all the fields in |
agent/app/agent_capability.go
Outdated
@@ -63,7 +64,11 @@ func (agent *ecsAgent) capabilities() []*ecs.Attribute { | |||
// Determine API versions to report as supported. Supported versions are also used for capability-enablement, except | |||
// logging drivers. | |||
for _, version := range agent.dockerClient.SupportedVersions() { | |||
capabilities = appendNameOnlyAttribute(capabilities, capabilityPrefix+"docker-remote-api."+string(version)) | |||
if dockerLegacyCapabilityPrefix[string(version)] { |
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 feels like it will be confusing from an administrative perspective. Can we insist that we keep all docker version capabilities using the old style for attributes?
64cbcbe
to
4f5cf48
Compare
Revert back to using old capability prefix for Docker remote API versions to maintain uniformity. |
@sharanyad doesn't this also need an update to the go-dockerclient lib? If so, please mention that in your PR so that this gets merged only after #987. |
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.
(only after that other PR gets merged).
4f5cf48
to
b3323f9
Compare
CHANGELOG.md
Outdated
@@ -2,6 +2,7 @@ | |||
|
|||
## UNRELEASED | |||
* Feature - Support for provisioning Tasks with ENIs | |||
* Enhancement - Add support for Docker remote API client version 1.25 [#996](https://github.com/aws/amazon-ecs-agent/pull/996) |
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.
Can you reword this message to make it more relevant to customers? Something like:
- Feature - Support running init process in containers by adding support for Docker remote API client version 1.25 #996
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.
I think we need to fix #1010 before we can merge this.
acbbb46
to
9dd0a73
Compare
9dd0a73
to
acab52b
Compare
Fixed issue #1010 that was a blocker for this PR. |
Summary
Add new Docker API version 1.25 support
Implementation details
Added 1.25 to supported agent version for init flag support.
Testing
make release
)go build -out amazon-ecs-agent.exe ./agent
)make test
) passgo test -timeout=25s ./agent/...
) passmake run-integ-tests
) pass.\scripts\run-integ-tests.ps1
) passmake run-functional-tests
) pass.\scripts\run-functional-tests.ps1
) passNew tests cover the changes:
Description for the changelog
Support for Docker Client version 1.25
Licensing
This contribution is under the terms of the Apache 2.0 License: yes