summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-07-14 09:07:08 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-07-22 14:20:00 -0400
commitcad36d4b7ad47ac0150c5b55472e92ca524c5b4d (patch)
tree1c453513b0c833e7361ebde9fbc399370930c1e8
parent31ecb728d21b155ece248ec44afab59e1d61437e (diff)
downloadpodman-cad36d4b7ad47ac0150c5b55472e92ca524c5b4d.tar.gz
podman-cad36d4b7ad47ac0150c5b55472e92ca524c5b4d.tar.bz2
podman-cad36d4b7ad47ac0150c5b55472e92ca524c5b4d.zip
Populate remaining unused fields in `pod inspect`
We were hard-coding two fields to false, instead of grabbing their value from the pod config, which means that `pod inspect` would print the wrong value always. Fixes #6968 Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r--libpod/pod_api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/pod_api.go b/libpod/pod_api.go
index cc10a3355..f889ba789 100644
--- a/libpod/pod_api.go
+++ b/libpod/pod_api.go
@@ -535,10 +535,10 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) {
State: podState,
Hostname: p.config.Hostname,
Labels: p.Labels(),
- CreateCgroup: false,
+ CreateCgroup: p.config.UsePodCgroup,
CgroupParent: p.CgroupParent(),
CgroupPath: p.state.CgroupPath,
- CreateInfra: false,
+ CreateInfra: infraConfig != nil,
InfraContainerID: p.state.InfraContainerID,
InfraConfig: infraConfig,
SharedNamespaces: sharesNS,