aboutsummaryrefslogtreecommitdiff
path: root/libpod/pod.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-04-28 18:26:14 -0400
committerGitHub <noreply@github.com>2022-04-28 18:26:14 -0400
commitab3e072a0c3d321fd12cbd1f6ef8e322c6d9214a (patch)
tree7b6629580d3b95f4fd4f42bedfbd5973ce1b098e /libpod/pod.go
parent765c8818e4ad7730b4d1a79bf33c3c3735c0a0e5 (diff)
parent64a368ba240e1249d4cd243242da2b7d2b27ff1b (diff)
downloadpodman-ab3e072a0c3d321fd12cbd1f6ef8e322c6d9214a.tar.gz
podman-ab3e072a0c3d321fd12cbd1f6ef8e322c6d9214a.tar.bz2
podman-ab3e072a0c3d321fd12cbd1f6ef8e322c6d9214a.zip
Merge pull request #14045 from cdoern/cgroupPath
remove unused codepath for creating/running ctr in a pod
Diffstat (limited to 'libpod/pod.go')
-rw-r--r--libpod/pod.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index 6cfe76a18..237c42901 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -1,7 +1,6 @@
package libpod
import (
- "context"
"fmt"
"sort"
"strings"
@@ -305,35 +304,9 @@ func (p *Pod) CgroupPath() (string, error) {
if err := p.updatePod(); err != nil {
return "", err
}
- if p.state.CgroupPath != "" {
- return p.state.CgroupPath, nil
- }
if p.state.InfraContainerID == "" {
return "", errors.Wrap(define.ErrNoSuchCtr, "pod has no infra container")
}
-
- id, err := p.infraContainerID()
- if err != nil {
- return "", err
- }
-
- if id != "" {
- ctr, err := p.infraContainer()
- if err != nil {
- return "", errors.Wrapf(err, "could not get infra")
- }
- if ctr != nil {
- ctr.Start(context.Background(), true)
- cgroupPath, err := ctr.CgroupPath()
- fmt.Println(cgroupPath)
- if err != nil {
- return "", errors.Wrapf(err, "could not get container cgroup")
- }
- p.state.CgroupPath = cgroupPath
- p.save()
- return cgroupPath, nil
- }
- }
return p.state.CgroupPath, nil
}