mirror of
https://github.com/containers/podman.git
synced 2025-08-02 09:12:36 +08:00
Fix nameing of Namespaces to be more consistent
Figuring out the difference between a User and a USERNS as well as Cgroup and CGROUPNS Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1417 Approved by: TomSweeneyRedHat
This commit is contained in:

committed by
Atomic Bot

parent
a40aa7e9c8
commit
dc025819f4
@ -250,7 +250,7 @@ var createFlags = []cli.Flag{
|
|||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "ipc",
|
Name: "ipc",
|
||||||
Usage: "IPC Namespace to use",
|
Usage: "IPC namespace to use",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "kernel-memory",
|
Name: "kernel-memory",
|
||||||
@ -312,7 +312,7 @@ var createFlags = []cli.Flag{
|
|||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "pid",
|
Name: "pid",
|
||||||
Usage: "PID Namespace to use",
|
Usage: "PID namespace to use",
|
||||||
},
|
},
|
||||||
cli.Int64Flag{
|
cli.Int64Flag{
|
||||||
Name: "pids-limit",
|
Name: "pids-limit",
|
||||||
|
@ -36,12 +36,12 @@ type psTemplateParams struct {
|
|||||||
Labels string
|
Labels string
|
||||||
Mounts string
|
Mounts string
|
||||||
PID int
|
PID int
|
||||||
Cgroup string
|
CGROUPNS string
|
||||||
IPC string
|
IPC string
|
||||||
MNT string
|
MNT string
|
||||||
NET string
|
NET string
|
||||||
PIDNS string
|
PIDNS string
|
||||||
User string
|
USERNS string
|
||||||
UTS string
|
UTS string
|
||||||
Pod string
|
Pod string
|
||||||
IsInfra bool
|
IsInfra bool
|
||||||
@ -435,7 +435,7 @@ func genPsFormat(format string, quiet, size, namespace, pod, infra bool) string
|
|||||||
podappend = "{{.Pod}}\t"
|
podappend = "{{.Pod}}\t"
|
||||||
}
|
}
|
||||||
if namespace {
|
if namespace {
|
||||||
return fmt.Sprintf("table {{.ID}}\t{{.Names}}\t%s{{.PID}}\t{{.Cgroup}}\t{{.IPC}}\t{{.MNT}}\t{{.NET}}\t{{.PIDNS}}\t{{.User}}\t{{.UTS}}", podappend)
|
return fmt.Sprintf("table {{.ID}}\t{{.Names}}\t%s{{.PID}}\t{{.CGROUPNS}}\t{{.IPC}}\t{{.MNT}}\t{{.NET}}\t{{.PIDNS}}\t{{.USERNS}}\t{{.UTS}}", podappend)
|
||||||
}
|
}
|
||||||
format = "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.Created}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}\t"
|
format = "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.Created}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}\t"
|
||||||
format += podappend
|
format += podappend
|
||||||
@ -583,12 +583,12 @@ func getTemplateOutput(psParams []psJSONParams, opts shared.PsOptions) ([]psTemp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if opts.Namespace {
|
if opts.Namespace {
|
||||||
params.Cgroup = ns.Cgroup
|
params.CGROUPNS = ns.Cgroup
|
||||||
params.IPC = ns.IPC
|
params.IPC = ns.IPC
|
||||||
params.MNT = ns.MNT
|
params.MNT = ns.MNT
|
||||||
params.NET = ns.NET
|
params.NET = ns.NET
|
||||||
params.PIDNS = ns.PIDNS
|
params.PIDNS = ns.PIDNS
|
||||||
params.User = ns.User
|
params.USERNS = ns.User
|
||||||
params.UTS = ns.UTS
|
params.UTS = ns.UTS
|
||||||
}
|
}
|
||||||
psOutput = append(psOutput, params)
|
psOutput = append(psOutput, params)
|
||||||
|
Reference in New Issue
Block a user