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

ASG Failed scale up after update aws_launch_template with aws provider 2.61.0 (currently latest version) #874

Closed
1 of 4 tasks
minggaograb opened this issue May 8, 2020 · 5 comments · Fixed by #875
Closed
1 of 4 tasks

Comments

@minggaograb
Copy link

minggaograb commented May 8, 2020

I have an issue when I update aws_launch_template with provider.aws=2.61.0.

I'm submitting a...

  • bug report
  • feature request
  • support request - read the FAQ first!
  • kudos, thank you, warm fuzzy

What is the current behavior?

The latest terraform provider rolled out a new improvement with in MR. It will set "partition_number" to 0 when you not handle it at placement. This will cause ASG failed to launch instance with error
Launching a new EC2 instance. Status Reason: Could not launch Spot Instances. InvalidParameterValue - You cannot use PartitionNumber with a Placement Group that does not exist. Specify a valid Placement Group and try again. Launching EC2 instance failed.

If this is a bug, how to reproduce? Please include a code sample if relevant.

Use aws provider 2.61.0 (currently latest version), update any launch template and apply

What's the expected behavior?

ASG will failed to scale up

Are you able to fix this problem and submit a PR? Link here if you have already.

NA

Environment details

  • Affected module version:
  • OS: mac
  • Terraform version: 0.11.14

Any other relevant info

@dpiddockcmp
Copy link
Contributor

I've put a fix in #875. Can you confirm that it fixes your issue?

@minggaograb
Copy link
Author

HI @dpiddockcmp , thanks for fix. It do solve our issue when we didn't set "launch_template_placement_group" in "var.worker_groups_launch_template".
But since we do not handle "partition_number" in "placement" block, for users want to set "group_name" to "Partition", the partition_number would be become 0 which is an illegal value. I guess this depends how they gonna fix for issue #13236 in terraform-aws-provider.

@barryib
Copy link
Member

barryib commented May 9, 2020

Reopening until a fix is merged upstream or in this module.

@TBeijen
Copy link

TBeijen commented May 15, 2020

For us reverting to provider 2.60.0 didn't fix the problem. No proposed changes by TF (likely simply ignores anything related to partition number).

Reverting to previous launch template version stopped the bleeding (be sure not to revert to incompatible AMIs or anything).

Trick to fix if having broken asg via provider 2.61.0: Pin provider to 2.60.0, trigger a new launch template version by for example increasing disk space from 100 to 105.

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants