-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use ohai to determine network IP, allow specification primary network interface for hostsfile generation. #26
Use ohai to determine network IP, allow specification primary network interface for hostsfile generation. #26
Conversation
…ce to look at via primary_interface config value, defaulting to what Ohai found to be the default_interface. Useful for test kitchens, allowing the vagrant NAT interface to be side-stepped for the purposes of generating /etc/hosts
Thanks very much for this. Could we just get the tests to pass and see if we can write a few tests for this functionality? |
Having a look into that now. |
Re: testing the functionality, I'll need to add a private interface to the kitchen suite. Any suggestions on what IP/network would be best to use? |
@jhohertz there are known range conflicts that is true. I ended using https://github.com/flaccid/rancher-test-farm/blob/master/Vagrantfile#L13-L14 - anything in that /16 should be ok iirc. |
@jhohertz any luck? I've been starved for time lately, don't mind waiting for those tests before we release next. |
Yeah I know the feeling.... I fixed the style warnings but need to add a test still, i'll try to look at that today. |
…not exist prior. The kitchen has been modified to specify a second interface, and to specify said interface as the primary. The test looks for the IP of the secondary interface in this entry.
So at this point I have added a test which ensure coverage of the new feature, but not sure how I can test not using it without launching a second suite without the feature enabled. If you'd like me to go that route, I'll happily set it up, but it feels a bit extreme for one test. Let me know, otherwise I think it's good to go. Happy to hear other suggestions on approach. |
I'll ponder on that notion, its always a hard one to test different integration setups. Thanks very much for this! |
Use ohai to determine network IP, allow specification primary network interface for hostsfile generation.
Thought this would be useful to others, and I'm happy to adjust the code to get it upstream.
Thanks for having a look.