summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/containers_create.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-09-01 12:51:00 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-09-07 18:18:54 +0000
commit87f90ce14abf36fbf85f6128b3024ea89a44d670 (patch)
tree7090c0a491c2f4199f8172e1d30b525fa938ed86 /pkg/varlinkapi/containers_create.go
parentccc4a339cd124abc668b7542a9eb838cd7d1b214 (diff)
downloadpodman-87f90ce14abf36fbf85f6128b3024ea89a44d670.tar.gz
podman-87f90ce14abf36fbf85f6128b3024ea89a44d670.tar.bz2
podman-87f90ce14abf36fbf85f6128b3024ea89a44d670.zip
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 <dwalsh@redhat.com> Closes: #1418 Approved by: mheon
Diffstat (limited to 'pkg/varlinkapi/containers_create.go')
-rw-r--r--pkg/varlinkapi/containers_create.go12
1 files changed, 6 insertions, 6 deletions
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,
}