1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration-cli/daemon_unix.go
Jana Radhakrishnan 99a98ccc14 Add support for docker run in swarm mode overlay
This PR adds support for running regular containers to be connected to
swarm mode multi-host network so that:
    - containers connected to the same network across the cluster can
      discover and connect to each other.
    - Get access to services(and their associated loadbalancers)
      connected to the same network

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-09-07 21:20:41 -07:00

35 lines
839 B
Go

// +build !windows
package main
import (
"os"
"path/filepath"
"syscall"
"github.com/go-check/check"
)
func cleanupExecRoot(c *check.C, execRoot string) {
// Cleanup network namespaces in the exec root of this
// daemon because this exec root is specific to this
// daemon instance and has no chance of getting
// cleaned up when a new daemon is instantiated with a
// new exec root.
netnsPath := filepath.Join(execRoot, "netns")
filepath.Walk(netnsPath, func(path string, info os.FileInfo, err error) error {
if err := syscall.Unmount(path, syscall.MNT_FORCE); err != nil {
c.Logf("unmount of %s failed: %v", path, err)
}
os.Remove(path)
return nil
})
}
func signalDaemonDump(pid int) {
syscall.Kill(pid, syscall.SIGQUIT)
}
func signalDaemonReload(pid int) error {
return syscall.Kill(pid, syscall.SIGHUP)
}