Skip to content

Commit

Permalink
Merge pull request #14045 from cdoern/cgroupPath
Browse files Browse the repository at this point in the history
remove unused codepath for creating/running ctr in a pod
  • Loading branch information
openshift-merge-robot authored Apr 28, 2022
2 parents 765c881 + 64a368b commit ab3e072
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions libpod/pod.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package libpod

import (
"context"
"fmt"
"sort"
"strings"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit ab3e072

Please sign in to comment.