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

fix aws instance read subnet eth0 #6761

Merged

Conversation

Djuke
Copy link
Contributor

@Djuke Djuke commented May 19, 2016

Reading the aws instance it was assumed that eth0 was the first in the list of network interfaces. This is true when there is only one interface, but if you attach multiple network interfaces with different subnets then you don't know which subnet of which ni is read.

With this fix I assume that the subnet you want is the one of the ni with device index 0. The ni upon creating the instance gets device index 0.

@Djuke
Copy link
Contributor Author

Djuke commented May 19, 2016

this may conflict with #6387, but it has the same fix

@radeksimko
Copy link
Member

I managed to reproduce the bug with the following config: https://gist.github.com/radeksimko/4ea29792dfd8522c04de5e3343ed705b
which I had to destroy & apply couple of times.

I originally wanted to ask you to add a test covering this, but it seems there's no easy way to test it as it's intermittent issue (AWS returns attached ENIs in no particular order).

Thanks for catching and fixing this @Djuke 👍

@radeksimko radeksimko merged commit c1eee52 into hashicorp:master May 29, 2016
@Djuke Djuke deleted the fix-aws-instance-read-subnet-eth0 branch June 2, 2016 06:33
@ghost
Copy link

ghost commented Apr 25, 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 25, 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.

3 participants