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

Launch Configuration unable to create instances in an Auto Scaling Group from a custom snapshot AMI #7024

Closed
hazim1093 opened this issue Jun 6, 2016 · 4 comments
Labels
bug provider/aws waiting-response An issue/pull request is waiting for a response from the community

Comments

@hazim1093
Copy link

We're facing issues while launching an instance from our AMI, in an autoscaling group.
We do the following through terraform (basic steps):

  1. Create an instance through
  2. Create an AMI from that instance.
  3. Create a launch configuration and autoscaling group to launch instances from our AMI.

repo: https://github.com/stakater/stakater
(the command make application would trigger the above mentioned process)

We were using Terraform version 0.6.12, so encountered the known issue of encrypted flag in ebs_block_device (reference)

After that I tried different terraform versions and encountered the following issues with different terraform versions:


Terraform 0.6.12:
Times out while creating Autoscaling group, due to the bug mentioned above. (related to encrypted flag)

Describing the auto scaling group via the AWS CLI, it tells that the encrypted flag is not allowed.
This is a bug in this terraform version which has been fixed in later versions.


Terraform 0.6.16:
Completes the whole process successfully, creates an instance in an autoscaling group from our AMI. Just like we want to

Issue:
The instance created, does not have the cloud-config or any data from our original instance. In fact ANY instance created from that AMI (even manually) does not have any data or cloud-config from the initial instance.

I realized in Terraform 0.6.15 and 0.6.16, at every step after the initial instance is created, our initial instance is destroyed than created, and after the AMI has been created, every step after that it also destroys and creates the original instance AND the AMI as well. I did not understand this behavior, But I suspect it to be the reason why the any instance created from our AMI is (sort of) empty.


Terraform 0.6.9:
Most people suggested reverting back to this version, a few referred it as the most stable version. The whole process completes successfully and creates an instance in an auto scaling group from our AMI.

issue:
The instance that is created in an auto scaling group OR any instance created from the AMI (even manually) cannot be ssh-ed into.
It always asks for password, even after providing key while doing ssh (with the right permissions)


Terraform 0.6.15:
behaves just as 0.6.16 (the destroying and creating cycle)
but does not complete the process successfully, results in the same error as in 0.6.12


Issues I have seen and explored:
ansible/ansible-modules-core#1693
#5608
#5360
#5108

@catsby
Copy link
Contributor

catsby commented Jun 8, 2016

Hey @hazim1093 – #6512 was just merged and should resolve the encrypted error you were seeing. Are you able to build from master and see if that addresses any of your problems?

@catsby catsby added the waiting-response An issue/pull request is waiting for a response from the community label Jun 8, 2016
@catsby
Copy link
Contributor

catsby commented Jul 20, 2016

Hello –

I'm going to close this issue for now. If you have more information or configurations that can help me reproduce this procedure:

I realized in Terraform 0.6.15 and 0.6.16, at every step after the initial instance is created, our initial instance is destroyed than created, and after the AMI has been created, every step after that it also destroys and creates the original instance AND the AMI as well. I did not understand this behavior, But I suspect it to be the reason why the any instance created from our AMI is (sort of) empty.

I would be happy to investigate. Thanks!

@catsby catsby closed this as completed Jul 20, 2016
@hazim1093
Copy link
Author

Tested with release 0.7.0, works well!

@ghost
Copy link

ghost commented Apr 23, 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 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug provider/aws waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

No branches or pull requests

2 participants