Skip to content
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

avoid pull behavior check for namespace pause image #1840

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

sharanyad
Copy link
Contributor

@sharanyad sharanyad commented Feb 12, 2019

Summary

#1837

when ECS_IMAGE_PULL_BEHAVIOR is set to once and pause images are needed at the same time, agent will try to download pause image once and fail. this leads to the task failing.

Implementation details

avoid pull behavior check for pause image used for container namespaces setup

Testing

New tests cover the changes:

Manual testing:
setECS_IMAGE_PULL_BEHAVIOR=once and use pidMode:"task" in task definition.
Task fails to run without this code change and passes otherwise.

Description for the changelog

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -670,6 +670,10 @@ func (engine *DockerTaskEngine) pullContainer(task *apitask.Task, container *api
case apicontainer.ContainerCNIPause:
// ContainerCNIPause image are managed at startup
return dockerapi.DockerContainerMetadata{}

case apicontainer.ContainerNamespacePause:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, can you put this on one line?

case api.ContainerCNIPause | api.ContainerNamespacePause:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 oops

use ',' not '|' .... '|' does entirely the wrong thing

@sharanyad sharanyad force-pushed the pull-behavior-fix branch 3 times, most recently from e316a08 to f3051fe Compare February 12, 2019 20:31
@sharanyad
Copy link
Contributor Author

functional tests are failing due to low memory limit

@sharanyad sharanyad added this to the 1.25.3 milestone Feb 13, 2019
@sharanyad sharanyad merged commit 0747276 into aws:dev Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants