Skip to content

vendor: github.com/opencontainers/runc v1.2.0#47668

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:vendor_runc_1.2.0
Oct 25, 2024
Merged

vendor: github.com/opencontainers/runc v1.2.0#47668
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:vendor_runc_1.2.0

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Apr 3, 2024

vendor: github.com/opencontainers/runc v1.2.0

Removes dependency on various libcontainer packages;

  • github.com/opencontainers/runc/libcontainer/system
  • github.com/opencontainers/runc/libcontainer/user
  • github.com/opencontainers/runc/libcontainer/userns

full diff: opencontainers/runc@v1.1.14...v1.2.0

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Copy Markdown
Member Author

OK, looks like some changes are needed;

0.345 + go build -mod=vendor -modfile=vendor.mod -o /tmp/bundles/dynbinary-daemon/dockerd -tags ' journald' -buildmode=pie -ldflags '-w -X "github.com/docker/docker/dockerversion.Version=dev" -X "github.com/docker/docker/dockerversion.GitCommit=HEAD" -X "github.com/docker/docker/dockerversion.BuildTime=2024-04-03T12:29:20.000000000+00:00" -X "github.com/docker/docker/dockerversion.PlatformName=" -X "github.com/docker/docker/dockerversion.ProductName=" -X "github.com/docker/docker/dockerversion.DefaultProductLicense="   ' -gcflags= github.com/docker/docker/cmd/dockerd
57.03 # github.com/docker/docker/daemon
57.03 daemon/oci_linux.go:828:29: undefined: cgroups.GetInitCgroup

@thaJeztah
Copy link
Copy Markdown
Member Author

thaJeztah commented Apr 3, 2024

Relates to opencontainers/runc@fd5debf

Trying to figure out what the replacement would be; it looks like we're currently checking both a parent path and "own";

moby/daemon/oci_linux.go

Lines 826 to 837 in b7c0598

p := cgroupsPath
if useSystemd {
initPath, err := cgroups.GetInitCgroup("cpu")
if err != nil {
return errors.Wrap(err, "unable to init CPU RT controller")
}
_, err = cgroups.GetOwnCgroup("cpu")
if err != nil {
return errors.Wrap(err, "unable to init CPU RT controller")
}
p = filepath.Join(initPath, s.Linux.CgroupsPath)
}

This commit / comment may be related as well; opencontainers/runc@54e2021

libctr/cgroups: don't take init's cgroup into account

Sometimes, the init process is not in the root cgroup.
This can be noted by GetInitPath, which already scrubs the path of init.scope.

This was encountered when trying to patch the Kubelet to handle systemd being in a separate cpuset
from root (to allow load balance disabling for containers). At present, there's no way to have libcontainer or runc
manage cgroups in a hierarchy outside of the one init is in (unless the path contains init.scope, which is limiting)

@thaJeztah thaJeztah force-pushed the vendor_runc_1.2.0 branch 2 times, most recently from b2b8899 to ee4e5ba Compare April 4, 2024 12:31
@thaJeztah thaJeztah force-pushed the vendor_runc_1.2.0 branch 2 times, most recently from 2dc6247 to 299b587 Compare April 22, 2024 11:52
@thaJeztah thaJeztah force-pushed the vendor_runc_1.2.0 branch from 299b587 to 5d1a7f4 Compare May 7, 2024 09:14
@thaJeztah thaJeztah force-pushed the vendor_runc_1.2.0 branch from 5d1a7f4 to 2fa2b75 Compare June 26, 2024 23:15
@thaJeztah thaJeztah changed the title vendor: github.com/opencontainers/runc v1.2.0-rc.1 vendor: github.com/opencontainers/runc v1.2.0-rc.2 Jun 26, 2024
@thaJeztah thaJeztah self-assigned this Jun 26, 2024
@thaJeztah thaJeztah changed the title vendor: github.com/opencontainers/runc v1.2.0-rc.2 vendor: github.com/opencontainers/runc v1.2.0 Oct 23, 2024
@thaJeztah thaJeztah added this to the 28.0.0 milestone Oct 23, 2024
Removes dependency on various libcontainer packages;

- github.com/opencontainers/runc/libcontainer/system
- github.com/opencontainers/runc/libcontainer/user
- github.com/opencontainers/runc/libcontainer/userns

full diff: https://github.com/opencontainers/runc/compare/v1.1.14..v1.2.0

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah marked this pull request as ready for review October 24, 2024 17:39
@thaJeztah thaJeztah requested a review from AkihiroSuda October 24, 2024 17:39
Copy link
Copy Markdown
Contributor

@vvoland vvoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit d3c3a74 into moby:master Oct 25, 2024
@thaJeztah thaJeztah deleted the vendor_runc_1.2.0 branch October 25, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants