TheNewNormal / corectl.app

Controlling app of corectld server daemon for macOS
Apache License 2.0
167 stars 15 forks source link

Passing host DNS to corectld. #21

Closed TheIndifferent closed 8 years ago

TheIndifferent commented 8 years ago

Needed change when there is internal registry instance in the office network and internal DNS is needed to resolve its hostname. Maybe that change will look better inside corectld itself, but will take me way more time to learn go and do it, while I want to use CoreOS.app already.

rimusz commented 8 years ago

@AntonioMeireles what do think, keep it in corectl.app or you can make that in corectld directly?

AntonioMeireles commented 8 years ago

Hi @TheIndifferent Thanks !!! ... one case where this isn't going to work smothly, as is, is when the user has previously a local nameserver running in his mac host . corectld wouldn't start anyway as :53 would be binded already but nevertherless for this to be rock-solid the ideal is to exclude in printLocalDns the host itself. Can you look at handling that ?

thanks again!

TheIndifferent commented 8 years ago

Sure. To make sure I understand what you mean, if there is already a local DNS running on 127.0.0.1:53 on host machine then --recursive-nameservers should not be passed to corectld?

AntonioMeireles commented 8 years ago

if there is a local DNS server running on :53 (any IP/interface on localhost) it should not be passed. PLease do note that in this scenario corectld will fail to start anyway.

TheIndifferent commented 8 years ago

👍 got it

TheIndifferent commented 8 years ago

Ok, changes implemented, tested, works well so far. But noticed interesting issue, when I start the laptop it takes couple more seconds for wifi to establish the connection and for resolv.conf to be updated, in the meantime corectld starts with google dns parameters. So after resolv.conf is updated I have to restart corectl.app to pick up new DNS servers. No idea if it is possible to monitor from go and if corectld could do it dynamically.

rimusz commented 8 years ago

I will leave it for @AntonioMeireles to check it out

rimusz commented 8 years ago

this one is going to be taken care at corectl #88 closing

AntonioMeireles commented 7 years ago

@rimuz,

reopening (due to https://github.com/TheNewNormal/corectl/issues/88#issuecomment-262643094). It's fixed in corectl side. UI needs a way to allow setting of the custom --recursive-nameservers.