go-connections icon indicating copy to clipboard operation
go-connections copied to clipboard

socket: try removing if socket-location is a directory on Linux

Open thaJeztah opened this issue 5 years ago • 3 comments

Alternative for https://github.com/docker/go-connections/pull/72. Relates to https://github.com/moby/moby/issues/41392

Due to race-conditions between containers starting and the Docker remote API being up, containers bind-mounting the docker-socket may cause the socket-path to be created as a directory.

This patch will attempt to remove the directory in such situations. Removing will fail if the directory is not empty.

thaJeztah avatar Aug 28 '20 16:08 thaJeztah

Oops, didn't stage some files and pushed the wrong version; fixing now

thaJeztah avatar Aug 28 '20 17:08 thaJeztah

done 😅

thaJeztah avatar Aug 28 '20 17:08 thaJeztah

macOS is failing due to the tempdir-location and/or permissions of it; I'll have to look at that; not a "real" failure, just have to look at how to make the test work

    --- FAIL: TestUnixSocketConflictDirectory/conflicting_file (0.00s)
        unix_socket_test.go:30: dial unix /var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/TestUnixSocketConflictDirectory549534108/test2.sock: connect: permission 

thaJeztah avatar Nov 10 '23 21:11 thaJeztah