Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
go
golang-gvisor
golang-gvisor-setscore.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File golang-gvisor-setscore.patch of Package golang-gvisor
From e227084ff1fd1fed74cb520b213e75696cc82ae7 Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Wed, 17 Apr 2024 16:08:13 +0100 Subject: [PATCH] Update to newer containerd API: SetScore() from shim. The SetScore() function has been deleted. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- pkg/shim/service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/shim/service.go b/pkg/shim/service.go index 5c12da03b..0506c6f53 100644 --- a/pkg/shim/service.go +++ b/pkg/shim/service.go @@ -44,6 +44,7 @@ import ( "github.com/containerd/containerd/runtime/v2/shim" taskAPI "github.com/containerd/containerd/runtime/v2/task" "github.com/containerd/containerd/sys/reaper" + "github.com/containerd/containerd/sys" "github.com/containerd/typeurl" "github.com/gogo/protobuf/types" specs "github.com/opencontainers/runtime-spec/specs-go" @@ -280,7 +281,7 @@ func (s *service) StartShim(ctx context.Context, opts shim.StartOpts) (string, e if err := shim.WriteAddress(shimAddressPath, address); err != nil { return "", err } - if err := shim.SetScore(cmd.Process.Pid); err != nil { + if err := sys.SetOOMScore(cmd.Process.Pid, -999); err != nil { return "", fmt.Errorf("failed to set OOM Score on shim: %w", err) } cu.Release() -- 2.44.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor