summaryrefslogtreecommitdiff
path: root/cmd/podman/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-07-27 12:02:25 -0400
committerGitHub <noreply@github.com>2022-07-27 12:02:25 -0400
commit87f892e5b56c2fab2f394f8cc79794ccce03f510 (patch)
tree1ba831a9dddfb6927698bcb9e0c2bee913ad0dcb /cmd/podman/system
parentc57b5c9b831695f8c54d11b4f288d6037c096fea (diff)
parent983cfb90e68d7b292b0f6ee8800c3f23383493cc (diff)
downloadpodman-87f892e5b56c2fab2f394f8cc79794ccce03f510.tar.gz
podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.tar.bz2
podman-87f892e5b56c2fab2f394f8cc79794ccce03f510.zip
Merge pull request #15076 from mheon/bump_420_rc2
Bump to v4.2.0-RC2
Diffstat (limited to 'cmd/podman/system')
-rw-r--r--cmd/podman/system/events.go2
-rw-r--r--cmd/podman/system/service_abi.go23
2 files changed, 2 insertions, 23 deletions
diff --git a/cmd/podman/system/events.go b/cmd/podman/system/events.go
index 09e589d3c..b04668f86 100644
--- a/cmd/podman/system/events.go
+++ b/cmd/podman/system/events.go
@@ -46,7 +46,7 @@ func init() {
flags := eventsCommand.Flags()
filterFlagName := "filter"
- flags.StringArrayVar(&eventOptions.Filter, filterFlagName, []string{}, "filter output")
+ flags.StringArrayVarP(&eventOptions.Filter, filterFlagName, "f", []string{}, "filter output")
_ = eventsCommand.RegisterFlagCompletionFunc(filterFlagName, common.AutocompleteEventFilter)
formatFlagName := "format"
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 6823d77ba..8d0240a8d 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -11,7 +11,6 @@ import (
"os"
"path/filepath"
- "github.com/containers/common/pkg/cgroups"
"github.com/containers/podman/v4/cmd/podman/registry"
api "github.com/containers/podman/v4/pkg/api/server"
"github.com/containers/podman/v4/pkg/domain/entities"
@@ -24,26 +23,6 @@ import (
"golang.org/x/sys/unix"
)
-// maybeMoveToSubCgroup moves the current process in a sub cgroup when
-// it is running in the root cgroup on a system that uses cgroupv2.
-func maybeMoveToSubCgroup() error {
- unifiedMode, err := cgroups.IsCgroup2UnifiedMode()
- if err != nil {
- return err
- }
- if !unifiedMode {
- return nil
- }
- cgroup, err := utils.GetOwnCgroup()
- if err != nil {
- return err
- }
- if cgroup == "/" {
- return utils.MoveUnderCgroupSubtree("init")
- }
- return nil
-}
-
func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities.ServiceOptions) error {
var (
listener net.Listener
@@ -125,7 +104,7 @@ func restService(flags *pflag.FlagSet, cfg *entities.PodmanConfig, opts entities
return err
}
- if err := maybeMoveToSubCgroup(); err != nil {
+ if err := utils.MaybeMoveToSubCgroup(); err != nil {
return err
}