summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-06-04 17:43:08 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-06-04 17:43:08 -0400
commit9be0d759b8dc6f1f5967d511c85924cd923b5ae6 (patch)
tree981c59ecb15dfc44cb9f0befc247ab840e1afc87 /cmd
parent644a7b78ff1d2ee7805d8ddc105827b421ec598d (diff)
downloadpodman-9be0d759b8dc6f1f5967d511c85924cd923b5ae6.tar.gz
podman-9be0d759b8dc6f1f5967d511c85924cd923b5ae6.tar.bz2
podman-9be0d759b8dc6f1f5967d511c85924cd923b5ae6.zip
Strip defaults from namespace flags
We were picking up defaults from the client's containers.conf, which broke pod namespaces. The server-side code already checks containers.conf when not explicitly overridden by the user, or by the container being part of a pod (the last bit being our bug). This only manifested on systems with a containers.conf installed, so RHEL 8 and Fedora 32 (which means our F32 CI VMs likely should have caught it, but didn't, which is concerning). This prevents defaults for these flags being shown, but they were incorrect anyways for `podman-remote`, so I'm not terribly concerned. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/create.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 7086dc839..4d4dea0d2 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -50,7 +50,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"Drop capabilities from the container",
)
createFlags.String(
- "cgroupns", containerConfig.CgroupNS(),
+ "cgroupns", "",
"cgroup namespace to use",
)
createFlags.StringVar(
@@ -244,7 +244,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"Keep STDIN open even if not attached",
)
createFlags.String(
- "ipc", containerConfig.IPCNS(),
+ "ipc", "",
"IPC namespace to use",
)
createFlags.StringVar(
@@ -325,7 +325,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
)
// markFlagHidden(createFlags, "override-os")
createFlags.String(
- "pid", containerConfig.PidNS(),
+ "pid", "",
"PID namespace to use",
)
createFlags.Int64Var(
@@ -454,11 +454,11 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
"Username or UID (format: <name|uid>[:<group|gid>])",
)
createFlags.String(
- "userns", containerConfig.Containers.UserNS,
+ "userns", "",
"User namespace to use",
)
createFlags.String(
- "uts", containerConfig.Containers.UTSNS,
+ "uts", "",
"UTS namespace to use",
)
createFlags.StringArrayVar(