From 87f90ce14abf36fbf85f6128b3024ea89a44d670 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 1 Sep 2018 12:51:00 -0400 Subject: Fix pod sharing for utsmode We should be sharing cgroups namespace by default in pods uts namespace sharing was broken in pods. Create a new libpod/pkg/namespaces for handling of namespace fields in containers Signed-off-by: Daniel J Walsh Closes: #1418 Approved by: mheon --- pkg/varlinkapi/containers_create.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pkg/varlinkapi') diff --git a/pkg/varlinkapi/containers_create.go b/pkg/varlinkapi/containers_create.go index e57f51cc1..843d7a5ba 100644 --- a/pkg/varlinkapi/containers_create.go +++ b/pkg/varlinkapi/containers_create.go @@ -12,9 +12,9 @@ import ( "github.com/containers/libpod/libpod" "github.com/containers/libpod/libpod/image" "github.com/containers/libpod/pkg/inspect" + "github.com/containers/libpod/pkg/namespaces" cc "github.com/containers/libpod/pkg/spec" "github.com/containers/libpod/pkg/util" - "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/signal" "github.com/sirupsen/logrus" ) @@ -164,10 +164,10 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru LogDriverOpt: create.Log_driver_opt, Name: create.Name, Network: networkMode, - IpcMode: container.IpcMode(create.Ipc_mode), - NetMode: container.NetworkMode(networkMode), - UtsMode: container.UTSMode(create.Uts_mode), - PidMode: container.PidMode(create.Pid_mode), + IpcMode: namespaces.IpcMode(create.Ipc_mode), + NetMode: namespaces.NetworkMode(networkMode), + UtsMode: namespaces.UTSMode(create.Uts_mode), + PidMode: namespaces.PidMode(create.Pid_mode), Pod: create.Pod, Privileged: create.Privileged, Publish: create.Publish, @@ -209,7 +209,7 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru Tmpfs: create.Tmpfs, Tty: create.Tty, User: user, - UsernsMode: container.UsernsMode(create.Userns_mode), + UsernsMode: namespaces.UsernsMode(create.Userns_mode), Volumes: create.Volumes, WorkDir: workDir, } -- cgit v1.2.3-54-g00ecf