Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused codepath for creating/running ctr in a pod #14045

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -296,35 +295,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")
cdoern marked this conversation as resolved.
Show resolved Hide resolved
}

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