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

Watch resolv.conf for changes #41

Open
kelunik opened this issue Jan 4, 2017 · 10 comments
Open

Watch resolv.conf for changes #41

kelunik opened this issue Jan 4, 2017 · 10 comments

Comments

@kelunik
Copy link
Member

kelunik commented Jan 4, 2017

I think we should watch /etc/resolv.conf for changes or alternatively cache the config only for a certain amount of time.

@bwoebi
Copy link
Member

bwoebi commented Jan 4, 2017

I'd opt for watching, but doing that AFAIK requires access to a syscall (i.e. fanotify/inotify etc.), which requires an extra ext.

We could do that optionally, but by default we should just cache it for a (globally) fixed time.

@kelunik
Copy link
Member Author

kelunik commented Jan 4, 2017

Right. Additionally we can't do that on Windows.

@bwoebi
Copy link
Member

bwoebi commented Jan 4, 2017

On Windows System.IO.FileSystemWatcher is a thing, it just needs to be available in an ext…

@kelunik
Copy link
Member Author

kelunik commented Jan 4, 2017

@bwoebi We need to watch the registry, not the file system.

@staabm
Copy link
Member

staabm commented Jan 4, 2017

auto-reload on changes should be a opt-in feature. people are used to re-start applications/shells etc. on such fundamental changes.

@kelunik
Copy link
Member Author

kelunik commented Jan 4, 2017

@staabm They're not. /etc/resolv.conf usually takes effect immediately.

@bwoebi
Copy link
Member

bwoebi commented Jan 4, 2017

@kelunik In that case you need RegistryKeyChangeEvent (you can access these WMI events via COM).

@kelunik
Copy link
Member Author

kelunik commented Jan 4, 2017

@bwoebi in case it's available. But we can have these watchers as progressive enhancement at any time.

@kelunik
Copy link
Member Author

kelunik commented Jul 6, 2017

This can be done manually now, but I guess we should still add it by default. What's a good interval for that?

cbe273c

@roquie
Copy link

roquie commented Apr 30, 2020

Without this feature services in kubernetes can't work with inside local network by dns.
It fails with following reason:

In Rfc1035StubResolver.php line 193:

  All query attempts failed for {{ADDRESS}}-prod.svc.cluster.l
  ocal: Server returned error code: 3, Server returned error code: 3


In functions.php line 534:

  Multiple errors encountered; use Amp\MultiReasonException::getReasons() to
  retrieve the array of exceptions thrown

Sad but true.

UPD: Hm. Config reload does not help me. This error needs a new issue.

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

No branches or pull requests

4 participants