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

Add support for looking up Private DNS Name for hostname #197

Merged
merged 5 commits into from
Feb 16, 2016
Merged

Add support for looking up Private DNS Name for hostname #197

merged 5 commits into from
Feb 16, 2016

Conversation

mihado
Copy link
Contributor

@mihado mihado commented Sep 29, 2015

In some circumstances - for example proxy settings that are configurable on hostnames - the private_dns_name is preferred over the private_ip_address

When private_dns is provided as the option in .kitchen.yml, the value of private_dns_name will be returned

driver:
  interface: private_dns

When this option is unset, the private_ip_address will be returned as in the current implementation

@mihado
Copy link
Contributor Author

mihado commented Sep 29, 2015

\cc @zl4bv @tjnicholas

@jkeiser
Copy link
Contributor

jkeiser commented Feb 12, 2016

@MEKF is the private dns name ever preferred over the private ip? Do we want to inject this third in the priority instead of fourth?

@zl4bv
Copy link
Contributor

zl4bv commented Feb 13, 2016

is the private dns name ever preferred over the private ip?

Given a user is behind a proxy
And the user's no_proxy list is set to .compute.internal (because IP prefixes are not supported)
And the kitchen-ec2 instance is also behind the proxy
And the transport is set to WinRM

When kitchen-ec2 connects to the instance

Then it should connect to the instance using the private DNS address
And the WinRM requests should not go through the proxy

@jkeiser
Copy link
Contributor

jkeiser commented Feb 13, 2016

I'm unclear whether that is a more common or less common case than the opposite. Well, 👍 at any rate, seems reasonable.

@zl4bv
Copy link
Contributor

zl4bv commented Feb 13, 2016

The flipside is that the compute.internal. zone is generally only resolvable inside AWS. So a host outside of AWS would not be able connect to a test instance using private DNS even if the correct connectivity/routing was in place.

Certainly not sure which case is more common, but the "play it safe" option in my opinion would be to keep the current order with private IP address preferred over private DNS.

@jkeiser
Copy link
Contributor

jkeiser commented Feb 13, 2016

Fair enough! Paging @test-kitchen/maintainers @test-kitchen/kitchen-ec2-maintainers

@proffalken
Copy link

Code looks fine to me, approve of the ordering as well - I've had some real issues with Ansible when trying to SSH via private_dns so defaulting to the IP is the sensible thing to do IMHO.

+1

jkeiser added a commit that referenced this pull request Feb 16, 2016
Add support for looking up Private DNS Name for hostname
@jkeiser jkeiser merged commit b088645 into test-kitchen:master Feb 16, 2016
@mihado
Copy link
Contributor Author

mihado commented Feb 17, 2016

thanks @jkeiser @zl4bv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants