diff options
Diffstat (limited to 'libpod/pod_api.go')
-rw-r--r-- | libpod/pod_api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/pod_api.go b/libpod/pod_api.go index 5f4d983b9..4e0acf950 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -582,6 +582,7 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) { // Infra config contains detailed information on the pod's infra // container. var infraConfig *define.InspectPodInfraConfig + var inspectMounts []define.InspectMount if p.state.InfraContainerID != "" { infra, err := p.runtime.GetContainer(p.state.InfraContainerID) if err != nil { @@ -597,6 +598,11 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) { infraConfig.CPUSetCPUs = p.ResourceLim().CPU.Cpus infraConfig.PidNS = p.PidMode() infraConfig.UserNS = p.UserNSMode() + namedVolumes, mounts := infra.sortUserVolumes(infra.Config().Spec) + inspectMounts, err = infra.GetInspectMounts(namedVolumes, infra.config.ImageVolumes, mounts) + if err != nil { + return nil, err + } if len(infra.Config().ContainerNetworkConfig.DNSServer) > 0 { infraConfig.DNSServer = make([]string, 0, len(infra.Config().ContainerNetworkConfig.DNSServer)) @@ -645,6 +651,7 @@ func (p *Pod) Inspect() (*define.InspectPodData, error) { CPUSetCPUs: p.ResourceLim().CPU.Cpus, CPUPeriod: p.CPUPeriod(), CPUQuota: p.CPUQuota(), + Mounts: inspectMounts, } return &inspectData, nil |