-
Notifications
You must be signed in to change notification settings - Fork 521
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 for ECS Agent parameters ImagePullBehavior and WarmPoolsSupport #2063
Conversation
Hi @mello7tre ! Appreciate the contribution. We're looking at this - we'd love to figure out a good way to accomplish this for both ECS/EKS in a more generic way. |
Can you help me better understand your use case? Since the ECS agent just waits until the instance reaches the In #1788 @samjo-nyang proposed a method for pulling container images and then marking the instance as |
Sure, the problem arise if you use a CapacityProvider [CP], start an instance out of the AutoscalingGroup [ASG] that the CP is using and later attach it to the ASG (this is what happen for warm pools). I have opend a ticket on AWS Support too, but then i found out that they have already taken in account that case and solved it with the code triggered by the param In detail: The effect is that even if the container instance is registered in the cluster, services configured to use the capacity providers are unable to start on that instance. So, the |
bcff6cd
to
b97e49d
Compare
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.
Thanks! This looks really close, just a few clean-up suggestions. Let me know if you want us to handle them.
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.
LGTM! Thanks!
👋
Can you squash all the commits together into a single commit? I'd also still prefer to back out the changes to |
2593a2b
to
563c774
Compare
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.
Nice!
CI failed for this reason:
Looks like you'll need to add the modified
If you can add that and squash together the commits again, I'll kick off the CI run. |
b86f044
to
c8ddef8
Compare
running |
Now the
|
c8ddef8
to
3b97840
Compare
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.
LGTM, thanks!
sorry for the troubles, next time (if any), i will remember to include Cargo.lock and to run format command. |
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.
Thanks!
let me know if i need to rebase it on latest commits to resolve conflicts.... |
@mello7tre yes, please rebase this if you don't mind, and then we can try to get it merged before more conflicts appear. |
…upport They be configured using the keys: settings.ecs.image-pull-behavior: (default*|always|once|prefer-cached) settings.autoscaling.should-wait: (true|false*) WarmPoolsSupport use a more generic key settings, as for advice of @bcressey, this way it can be used, in future, for other variants. At the moment `settings.autoscaling.should-wait` is used only for the aws-ecs* variants.
3b97840
to
ea6e819
Compare
rebased |
Thank you! |
Issue number:
None.
I have looked in the backlog and found no task regarding new ecs-agent parameters, so i directly opened the PR.
Maybe WarmPoolsSupport can be used for #1788 (for the ECS part).
Description of changes:
Added support for ECS Agent parameters
ImagePullBehavior
andWarmPoolsSupport
.(relative to variables ECS_IMAGE_PULL_BEHAVIOR and ECS_WARM_POOLS_CHECK)
Can be configured using the keys:
settings.ecs.image-pull-behavior
settings.ecs.warm-pools-check
image-pull-behavior can have the values: default, always, once, prefer-cached.
Testing done:
executed
cargo make unit-tests
.Launched Bottlerocket instance using builded ami with user-data:
verified that the content of file
/etc/ecs/ecs.config.json
included the new settings:Note:
ImagePullBehavior
is aiota
.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.