-
Notifications
You must be signed in to change notification settings - Fork 522
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
ecs-agent: don't start if not configured #1049
ecs-agent: don't start if not configured #1049
Conversation
We have the same problem for kubelet and containerd today and need a general solution. I'd very much prefer not to propagate unit dependencies across the "configured" stage. Ideally we wouldn't reach |
Oh, didn't realize that we were missing |
My understanding is that for Kubelet, missing configuration will result in the service attempting to start but not being able to do anything useful as configuration is required. In contrast, the ECS agent is designed to be able to run without configuration; leaving it unconfigured will cause it to join the "default" cluster (which is probably not what you want if you've made errors in your user-data). I initially started looking at this through the lens of modifying
Adding |
If early-boot-config.service fails, configured.target should also fail. This allows services to require configured.target and conditionally fail if there are errors applying settings from user-data.
f8ee765
to
d41c7e7
Compare
@bcressey Updated to make |
This seems like a separate bug; it doesn't seem like invalid userdata should stop us from bringing up the default host containers. |
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 there's still some debate to be had about what to do when user data fails (and how we want it to fail) but this seems like a good change given our current understanding.
Issue number:
#815
Description of changes:
Configuration errors can manifest in one of two ways:
If configuration fails, the ECS agent should not start automatically.
Testing done:
Built an
aws-ecs-1
AMI. Launched three instances:systemctl status
showed the host in adegraded
state and bothecs.service
andchronyd.service
were markedinactive (dead)
with a note that this was due to a failed dependency[FAILED] Failed to start Bottlerocket userdata configuration system.
,[DEPEND] Dependency failed for Amazon Elasti…ntainer Service - container agent.
, and[DEPEND] Dependency failed for A versatile i…tion of the Network Time Protocol.
Built an
aws-dev
AMI. Launched three instances:systemctl status
showed the host in adegraded
state andchronyd.service
was markedinactive (dead)
with a note that this was due to a failed dependency[FAILED] Failed to start Bottlerocket userdata configuration system.
and[DEPEND] Dependency failed for A versatile i…tion of the Network Time Protocol.
Built an
aws-k8s-1.16
AMI. Launched three instances:systemctl status
showed the host in adegraded
state andchronyd.service
was markedinactive (dead)
with a note that this was due to a failed dependency[FAILED] Failed to start Bottlerocket userdata configuration system.
and[DEPEND] Dependency failed for A versatile i…tion of the Network Time Protocol.
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.