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

net: detect changes to /etc/resolv.conf #6670

Closed
josharian opened this issue Oct 25, 2013 · 11 comments
Closed

net: detect changes to /etc/resolv.conf #6670

josharian opened this issue Oct 25, 2013 · 11 comments

Comments

@josharian
Copy link
Contributor

net/dnsclient_unix.go has a TODO(rsc) near the top:

//  Check periodically whether /etc/resolv.conf has changed.

This would be very useful for us. (Not for Go 1.2, I know.) I'd happily put in the
effort to implement this, but I'd like to discuss first, to ensure that I take a good
approach and to check that there's nothing else planned that makes this moot.

The obvious question is around the "check periodically" part. Options include,
e.g.:

* Use fsnotify (extracted from or after #4068)
* Stat every n seconds
* Stat every n requests
* Stat after n DNS failures
* Stat on first request after n seconds have elapsed since last stat

Input on this?

Anything else I should be asking here?
@rsc
Copy link
Contributor

rsc commented Oct 29, 2013

Comment 1:

Please do:
* Stat on first request after n seconds have elapsed since last stat.

@robpike
Copy link
Contributor

robpike commented Nov 20, 2013

Comment 2:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@josharian
Copy link
Contributor Author

Comment 3:

Sorry, I should have mentioned that I've started on this. I have an initial
implementation that I'm unhappy with, and I want to do some other minor cleanup first in
other CLs. I'll get that rolling shortly after 1.2 is released.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 4:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 6:

Labels changed: added repo-main.

@josharian
Copy link
Contributor Author

Comment 7:

Since os/fsnotify is in the works, I'd like to wait for it to land and use it here, even
if it means that this doesn't make it into Go 1.3. (I'll do my best to get it in,
though, if os/fsnotify arrives in time.)

Owner changed to @josharian.

@gopherbot
Copy link

Comment 8 by guillaume@charmes.net:

CL for change as suggested bu rsc: https://golang.org/cl/83690045

@gopherbot
Copy link

Comment 9:

CL https://golang.org/cl/83690045 references this issue.

@gopherbot
Copy link

Comment 10:

CL https://golang.org/cl/83690045 references this issue.

@ianlancetaylor
Copy link
Contributor

Comment 11:

This issue was closed by revision bf1d400.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
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

5 participants