-
Notifications
You must be signed in to change notification settings - Fork 54
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
Error when start watching folder containing resolv.conf #462
Comments
Does |
@fatanugraha for what it's worth, there are still some issues after your file watch changes :( |
@cfergeau yes it exists |
Ouch, let me reproduce and see if i can think of any quick fix for this. |
By adding the code below into the test _, err := net.Listen("unix", filepath.Join(dir, "lol.sock"))
if err != nil {
panic(err)
}
panic(dir)
os.Symlink(filepath.Join(dir, "non-existent"), filepath.Join(dir, "hehe2"))
os.Symlink(filepath.Join(dir, "lol.sock"), filepath.Join(dir, "hehe")) I'm not able to reproduce the exact error but I got this error when i created a symlink to a socket. Error Trace: /Users/fatanugraha/fun/gvisor-tap-vsock/pkg/utils/filewatcher_test.go:45
Error: Received unexpected error:
adding watcher failed: "/Users/fatanugraha/Desktop/hehe": operation not supported on socket after a quick skim into fsnotify code, it doesn't seem to have any check on the destination file after resolving the link and they don't expose any useful options that we can use to workaround this error :/ If fsnotify/fsnotify#661 is resolved we can add the watch to |
#450 added a watcher to start watching the directory containing the resolv.conf file to be up to date of the name servers defined in it.
However it may fails at setting the watcher and resulting in gvproxy to not starting as it should.
On MacOS, I have the symlink
/etc/resolv.conf
->/private/var/run/resolv.conf
. When, inside../var/run
, there is the symlinkdocker.sock
->/Users/luca/.local/share/containers/podman/machine/podman.sock
I face agvproxy exiting: cannot add network services: adding watcher failed: "/private/var/run/docker.sock": no such file or directory
. If the symlink is removed, everything works as expected.The text was updated successfully, but these errors were encountered: