-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_ecs_service - deployment_minimum_healthy_percent for DAEMON #5236
Comments
Any news on this?
Definitely affects DAEMON deploys on ECS clusters. Having the setting at 0 will bring down your entire cluster instead of 50% which will do rolling deploys. Edit: For now, you can get around this when force deploying your ECS cluster. Specify
for the command
|
We just hit this issue as well. 0 is not a safe default for minHealthyPercent, and it should be settable for a DAEMON service. |
Looks like this is ignored in the code explicitly, and that "deployment_maximum_percent" is also ignored when the strategy is DAEMON. This was introduced by aca44f4. I'm not sure if only removing those conditions would work, but would be happy to provide a PR if that looks like the answer. |
+1 for fixing this. Just ran into this issue. I would be fine with providing a PR as well if it will fix this. |
Support has been merged and will release with version 1.42.0 of the AWS provider, likely later today. 👍 |
This has been released in version 1.42.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
The value does not work correctly on consecutive apply attempts. Steps to reproduce:
Expected result:
Outcome:
Problem:
Right now, we need to manually set the cluster to deployment_minimum_healthy_percent = 0 when we revert to a single instance. |
As a workaround can you set deployment_minimum_healthy_percent to 1 instead of 0? This should have the same affect provided you have less than 100 instances. |
@mschurenko Thanks for the suggestion. My understanding is that 1% health is only achievable by running at least one instance. Hence, if there is only one instance, it cannot be terminated since that would drop the healthy percentage below 1%, and thus I need additional cluster capacity (to have at least two instances running during deployment), which does not play well with a daemon cluster setup. I'd have to test to be sure though. |
If that’s the case can you create a new issue specifically for this since this one has already been closed? |
@tglastra @mschurenko Do you know if this has been taken care of? I'm using AWS provider 1.42.0 and I'm experiencing the following:
|
we just noticed this issue as well... not sure how our other services had 0 set. but the new service was automatically set to 100 when i specifically have 0 in terraform :-\ |
Short solution:
I have checked that in v2.30.0, here is the code that affect these variables. But as far as I know, AWS will only allow us to set the maximum to 100% when the scheduling_strategy is "DAEMON", which means it can't be more than one task in the same EC2 instance. Furthermore, setting min to 50 and only running one available EC2 instance will cause new task pending forever. Because old task should hold to maintain to 50% minimun requirement. The new task has no where to deploy. So if you are using the setting above(100, 50), available EC2 instances should be greater than 2 at least. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This issue was originally opened by @nirpod as hashicorp/terraform#18480. It was migrated here as a result of the provider split. The original body of the issue is below.
why wouldn't you support deployment_minimum_healthy_percent for DAEMON (for aws_ecs_service rss)?
AWS support this feature.
The text was updated successfully, but these errors were encountered: