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

Revert "Add support for 'podman pod' on FreeBSD" #16114

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
24 changes: 22 additions & 2 deletions libpod/pod_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ package libpod

import (
"fmt"
"path/filepath"
"time"

"github.com/containers/common/pkg/config"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/rootless"
"github.com/containers/storage/pkg/stringid"
"github.com/sirupsen/logrus"
)

// Creates a new, empty pod
Expand Down Expand Up @@ -60,8 +64,24 @@ func (p *Pod) refresh() error {
}
p.lock = lock

if err := p.platformRefresh(); err != nil {
return err
// We need to recreate the pod's cgroup
if p.config.UsePodCgroup {
switch p.runtime.config.Engine.CgroupManager {
case config.SystemdCgroupsManager:
cgroupPath, err := systemdSliceFromPath(p.config.CgroupParent, fmt.Sprintf("libpod_pod_%s", p.ID()), p.ResourceLim())
if err != nil {
logrus.Errorf("Creating Cgroup for pod %s: %v", p.ID(), err)
}
p.state.CgroupPath = cgroupPath
case config.CgroupfsCgroupsManager:
if rootless.IsRootless() && isRootlessCgroupSet(p.config.CgroupParent) {
p.state.CgroupPath = filepath.Join(p.config.CgroupParent, p.ID())

logrus.Debugf("setting pod cgroup to %s", p.state.CgroupPath)
}
default:
return fmt.Errorf("unknown cgroups manager %s specified: %w", p.runtime.config.Engine.CgroupManager, define.ErrInvalidArg)
}
}

// Save changes
Expand Down
5 changes: 0 additions & 5 deletions libpod/pod_internal_freebsd.go

This file was deleted.

34 changes: 0 additions & 34 deletions libpod/pod_internal_linux.go

This file was deleted.

Loading