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

aws autoscaling, do not have sufficient capacity #9074

Closed
pbthorste opened this issue Sep 27, 2016 · 1 comment · Fixed by #14480
Closed

aws autoscaling, do not have sufficient capacity #9074

pbthorste opened this issue Sep 27, 2016 · 1 comment · Fixed by #14480

Comments

@pbthorste
Copy link
Contributor

Hi,

This is related to issue #8857
And it is probably a not a very common error.

Happens when amazon does not have sufficient capacity to launch an instance type.

Terraform Version

Terraform version 0.7.4

Affected Resource(s)

  • aws_autoscaling_group

Debug Output

2016/09/27 10:56:53 [DEBUG] plugin: terraform: aws-provider (internal) 2016/09/27 10:56:53 [DEBUG] "cluster-instances" Capacity: 0 ASG, 0 ELB, satisfied: false, reason: "Need at least 3 healthy instances in ASG, have 0"
2016/09/27 10:56:53 [DEBUG] plugin: terraform: aws-provider (internal) 2016/09/27 10:56:53 [TRACE] Waiting 10s before next try
2016/09/27 10:56:54 [DEBUG] vertex root, waiting for: module.test.aws_autoscaling_group.cluster_instances

Expected Behavior

Terraform should have given an error saying that aws does not have the instance type available

Actual Behavior

Terraform tries again and again until it fails after 10 minutes with the message:

aws_autoscaling_group.cluster_instances: "cluster-instances": Waiting up to 10m0s: Need at least 3 healthy instances in ASG, have 0

Steps to Reproduce

(not easy :) )
Find an availability zone that does not have enough instance types available, and launch an autoscaling group.

Important Factoids

Running the following command via the cli:

aws autoscaling describe-scaling-activities

gives the reason for the failure, i.e.

 {
  "Description": "Launching a new EC2 instance.  Status Reason: We currently do not have sufficient t2.large capacity in the Availability Zone you requested (eu-central-1a). Our system will be working on provisioning additional capacity. You can currently get t2.large capacity by not specifying an Availability Zone in your request or choosing eu-central-1b. Launching EC2 instance failed.",
  "AutoScalingGroupName": "cluster-instances",
  "ActivityId": "48ce299f-1322-4676-8d7f-1b0d9044b3ec",
  "Details": "{\"Subnet ID\":\"subnet-xxx\",\"Availability Zone\":\"eu-central-1a\"}",
  "StartTime": "2016-09-27T10:47:06.931Z",
  "Progress": 100,
  "EndTime": "2016-09-27T10:47:06Z",
  "Cause": "At 2016-09-27T10:46:56Z a user request created an AutoScalingGroup changing the desired capacity from 0 to 3.  At 2016-09-27T10:47:03Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 3.",
  "StatusMessage": "We currently do not have sufficient t2.large capacity in the Availability Zone you requested (eu-central-1a). Our system will be working on provisioning additional capacity. You can currently get t2.large capacity by not specifying an Availability Zone in your request or choosing eu-central-1b. Launching EC2 instance failed.",
  "StatusCode": "Failed"
}
@ghost
Copy link

ghost commented Apr 12, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants