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

Added a hook to query the security groups before launching the instan… #3656

Merged
merged 1 commit into from Jul 2, 2016
Merged

Conversation

mlosapio
Copy link

@mlosapio mlosapio commented Jun 27, 2016

Added a hook to query the security groups before launching the instance.

==> amazon-ebs: Authorizing access to port 22 the temporary security group...
2016/06/27 16:19:19 packer: 2016/06/27 16:19:19 Describing tempSecurityGroup to ensure it is available: sg-6c420317
2016/06/27 16:19:19 packer: 2016/06/27 16:19:19 Error in querying security group InvalidGroup.NotFound: The security group 'sg-6c420317' does not exist
2016/06/27 16:19:19 packer:     status code: 400, request id:
2016/06/27 16:19:24 packer: 2016/06/27 16:19:24 Describing tempSecurityGroup to ensure it is available: sg-6c420317
2016/06/27 16:19:24 packer: 2016/06/27 16:19:24 Found security group sg-6c420317
2016/06/27 16:19:24 ui: ==> amazon-ebs: Launching a source AWS instance...

Closes #2606

…ce - seems to catch the AWS eventual consistency nicely
@cbednarski
Copy link
Contributor

Thanks!

@cbednarski cbednarski merged commit a20d979 into hashicorp:master Jul 2, 2016
@bennettellis
Copy link

Hi, this fix seems to be mostly working, not always working for me. 5 tries with 5 seconds delay (~25 seconds total) is not adequate it seems all the time. Maybe AWS is getting slower at creating and configuring security groups. Can this be extended to allow for more time? or maybe change to a configuration parameter. I suspect no harm in looping 10 times?? Total ~50 seconds.

@mlosapio
Copy link
Author

I'd suggest opening a new issue - reference this issue and submit a pull request to adjust the parameters.

@bacoboy
Copy link

bacoboy commented Sep 2, 2016

Just happened to me twice. 3rd time worked.

Packer v0.10.1

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

Successfully merging this pull request may close these issues.

Possible race condition creating security groups with amazon-ebs builder
4 participants