aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorPeter Hunt <pehunt@redhat.com>2019-08-06 15:24:12 -0400
committerPeter Hunt <pehunt@redhat.com>2019-08-07 09:53:39 -0400
commita602e44e74865333d416fb75a29ba55554c3b02f (patch)
treea0ae9ad5cc0eb13d1aacb7db38b59a8216578c92 /pkg
parent7c9225610337c76203540377955ef7ae33302ba0 (diff)
downloadpodman-a602e44e74865333d416fb75a29ba55554c3b02f.tar.gz
podman-a602e44e74865333d416fb75a29ba55554c3b02f.tar.bz2
podman-a602e44e74865333d416fb75a29ba55554c3b02f.zip
refer to container whose namespace we share
Signed-off-by: Peter Hunt <pehunt@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/spec/spec.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index c16696ffe..156d6849d 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -551,8 +551,8 @@ func addPidNS(config *CreateConfig, g *generate.Generator) error {
if pidMode.IsHost() {
return g.RemoveLinuxNamespace(string(spec.PIDNamespace))
}
- if pidMode.IsContainer() {
- logrus.Debug("using container pidmode")
+ if pidCtr := pidMode.Container(); pidCtr != "" {
+ logrus.Debugf("using container %s pidmode", pidCtr)
}
if IsPod(string(pidMode)) {
logrus.Debug("using pod pidmode")
@@ -589,8 +589,8 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error {
} else if netMode.IsBridge() {
logrus.Debug("Using bridge netmode")
return nil
- } else if netMode.IsContainer() {
- logrus.Debug("Using container netmode")
+ } else if netCtr := netMode.Container(); netCtr != "" {
+ logrus.Debugf("using container %s netmode", netCtr)
return nil
} else if IsNS(string(netMode)) {
logrus.Debug("Using ns netmode")
@@ -616,8 +616,8 @@ func addUTSNS(config *CreateConfig, g *generate.Generator) error {
if utsMode.IsHost() {
return g.RemoveLinuxNamespace(string(spec.UTSNamespace))
}
- if utsMode.IsContainer() {
- logrus.Debug("using container utsmode")
+ if utsCtr := utsMode.Container(); utsCtr != "" {
+ logrus.Debugf("using container %s utsmode", utsCtr)
}
return nil
}
@@ -630,8 +630,8 @@ func addIpcNS(config *CreateConfig, g *generate.Generator) error {
if ipcMode.IsHost() {
return g.RemoveLinuxNamespace(string(spec.IPCNamespace))
}
- if ipcMode.IsContainer() {
- logrus.Debug("Using container ipcmode")
+ if ipcCtr := ipcMode.Container(); ipcCtr != "" {
+ logrus.Debugf("Using container %s ipcmode", ipcCtr)
}
return nil
@@ -648,8 +648,8 @@ func addCgroupNS(config *CreateConfig, g *generate.Generator) error {
if cgroupMode.IsPrivate() {
return g.AddOrReplaceLinuxNamespace(string(spec.CgroupNamespace), "")
}
- if cgroupMode.IsContainer() {
- logrus.Debug("Using container cgroup mode")
+ if cgCtr := cgroupMode.Container(); cgCtr != "" {
+ logrus.Debugf("Using container %s cgroup mode", cgCtr)
}
return nil
}