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

Comments

Projects
None yet
5 participants
@josharian
Copy link
Contributor

commented Oct 25, 2013

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

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2013

Comment 1:

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

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2013

Comment 2:

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

Status changed to Accepted.

@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Nov 20, 2013

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

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2013

Comment 4:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 5:

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 6:

Labels changed: added repo-main.

@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Feb 5, 2014

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

This comment has been minimized.

Copy link

commented Apr 3, 2014

Comment 8 by guillaume@charmes.net:

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

This comment has been minimized.

Copy link

commented Apr 9, 2014

Comment 9:

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

This comment has been minimized.

Copy link

commented Apr 9, 2014

Comment 10:

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

This comment has been minimized.

Copy link
Contributor

commented May 15, 2014

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.
You can’t perform that action at this time.