Merge pull request #1052 from mheon/conmon_socket_as_arg

Make attach sockets directory an argument in Conmon
This commit is contained in:
Daniel J Walsh 2017-10-24 21:48:33 -07:00 committed by GitHub
commit a3cd7c422c
3 changed files with 11 additions and 3 deletions

View file

@ -67,7 +67,7 @@ func (ss streamService) Attach(containerID string, inputStream io.Reader, output
}
})
attachSocketPath := filepath.Join("/var/run/crio", c.ID(), "attach")
attachSocketPath := filepath.Join(oci.ContainerAttachSocketDir, c.ID(), "attach")
conn, err := net.DialUnix("unixpacket", nil, &net.UnixAddr{Name: attachSocketPath, Net: "unixpacket"})
if err != nil {
return fmt.Errorf("failed to connect to container %s attach socket: %v", c.ID(), err)