Merge pull request #1141 from ijc/rootfsPropagation

containerd-shim: Do not remount root MS_SLAVE
This commit is contained in:
Phil Estes
2017-07-21 16:18:41 -04:00
committed by GitHub
7 changed files with 56 additions and 16 deletions

View File

@@ -67,9 +67,6 @@ func main() {
if err != nil {
return err
}
if err := setupRoot(); err != nil {
return err
}
path, err := os.Getwd()
if err != nil {
return err

View File

@@ -10,7 +10,6 @@ import (
"google.golang.org/grpc/credentials"
"golang.org/x/net/context"
"golang.org/x/sys/unix"
"github.com/containerd/containerd/reaper"
"github.com/containerd/containerd/sys"
@@ -33,11 +32,6 @@ func setupSignals() (chan os.Signal, error) {
return signals, nil
}
// setupRoot sets up the root as the shim is started in its own mount namespace
func setupRoot() error {
return unix.Mount("", "/", "", unix.MS_SLAVE|unix.MS_REC, "")
}
func newServer() *grpc.Server {
return grpc.NewServer(grpc.Creds(NewUnixSocketCredentils(0, 0)))
}

View File

@@ -23,11 +23,6 @@ func setupSignals() (chan os.Signal, error) {
return signals, nil
}
// setupRoot is a no op except on Linux
func setupRoot() error {
return nil
}
func newServer() *grpc.Server {
return grpc.NewServer()
}