Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

Problems defining an empty tld in Mac OS X #308

Open
dortegau opened this issue Mar 13, 2017 · 3 comments
Open

Problems defining an empty tld in Mac OS X #308

dortegau opened this issue Mar 13, 2017 · 3 comments

Comments

@dortegau
Copy link

dortegau commented Mar 13, 2017

I have problems when I define an empty TLD using landrush & molecule:

/Users/dortega/.vagrant.d/gems/gems/landrush-1.2.0/lib/landrush/cap/host/darwin/configure_visibility_on_host.rb:46:in `read': Is a directory @ io_fread - /etc/resolver (Errno::EISDIR)
	from /Users/dortega/.vagrant.d/gems/gems/landrush-1.2.0/lib/landrush/cap/host/darwin/configure_visibility_on_host.rb:46:in `contents_match?'
	from /Users/dortega/.vagrant.d/gems/gems/landrush-1.2.0/lib/landrush/cap/host/darwin/configure_visibility_on_host.rb:11:in `configure_visibility_on_host'

Mac OS X version: 10.12.3
Vagrant version: 1.8.6 (same problems using 1.9.2 version)
landrush version: 1.2.0

I think that the problem resides in this method definition: https://github.com/vagrant-landrush/landrush/blob/master/lib/landrush/cap/host/darwin/configure_visibility_on_host.rb#L41 because the config_dir is joined with the tld and the tld is empty in my configuration (defined in molecule.yml config):

vagrant:
  raw_config_args:
    - "landrush.enabled = true"
    - "landrush.tld = ''"
    - "landrush.guest_redirect_dns = false"
@dortegau dortegau changed the title problems defining empty tld in MacOsX (/etc/resolver is a directory) problems defining empty tld in Mac OS X (/etc/resolver is a directory) Mar 13, 2017
@dortegau dortegau changed the title problems defining empty tld in Mac OS X (/etc/resolver is a directory) Problems defining an empty tld in Mac OS X (/etc/resolver is a directory) Mar 13, 2017
@hferentschik
Copy link
Contributor

Why would you like to set an empty TLD?

@dortegau
Copy link
Author

I don’t use TLDs in Linux because I don’t need them, but it doesn’t work in Mac OS X.

I always use hostnames as simple as possible like “service1” or similar.

@hferentschik hferentschik changed the title Problems defining an empty tld in Mac OS X (/etc/resolver is a directory) Problems defining an empty tld in Mac OS X Oct 2, 2018
@hferentschik
Copy link
Contributor

The way the '/etc/resolver' system works on macOS requires that you define a TLD. Hence also the default of 'vagrant.test'. Not sure how host visibility would work then on macOS. Do you have any suggestions?

One could fail already fail earlier when validating the config and provide a better error message. However, that would of course still not give you an empty TLD.

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

No branches or pull requests

2 participants