opencontainers / opencontainers/cgroups

Test failures on Ubuntu containers (`no cgroup mount found in mountinfo`)

Open
#49 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Hello, some tests are failing when building new version under Ubuntu.
I can presume that systemd is not installed into the build environment, but maybe it is shown as running because it runs on the host?
https://launchpadlibrarian.net/827407202/buildlog_ubuntu-resolute-amd64.golang-github-opencontainers-cgroups_0.0.4-2_BUILDING.txt.gz

=== RUN TestInvalidCgroupPath
paths_test.go:19: couldn't get cgroup root: no cgroup mount found in mountinfo
--- FAIL: TestInvalidCgroupPath (0.00s)
=== RUN TestTryDefaultCgroupRoot
paths_test.go:102: tryDefaultCgroupRoot: want "/sys/fs/cgroup", got ""
--- FAIL: TestTryDefaultCgroupRoot (0.00s)
=== RUN TestPidsSetMax
--- PASS: TestPidsSetMax (0.00s)
=== RUN TestPidsSetUnlimited
--- PASS: TestPidsSetUnlimited (0.00s)
=== RUN TestPidsStats
--- PASS: TestPidsStats (0.00s)
=== RUN TestPidsStatsUnlimited
--- PASS: TestPidsStatsUnlimited (0.00s)
FAIL
FAIL github.com/opencontainers/cgroups/fs 0.075s
=== RUN TestParseCgroupFromReader
--- PASS: TestParseCgroupFromReader (0.00s)
=== RUN TestDefaultDirPath
defaultpath_test.go:52: need cgroupv2

? github.com/opencontainers/cgroups/internal/path [no test files]
=== RUN TestNilResources
manager_test.go:40: no cgroup mount found in mountinfo
--- FAIL: TestNilResources (0.00s)
=== RUN TestNilResourcesSystemd
manager_test.go:24: requires systemd
--- SKIP: TestNilResourcesSystemd (0.00s)
FAIL
FAIL github.com/opencontainers/cgroups/manager 0.004s
=== RUN TestRangeToBits

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing tests in paths_test.go, defaultpath_test.go, and manager_test.go, then inspect the linked Ubuntu build log to understand the missing cgroup mount and systemd environment. Reproduce the failures in an Ubuntu container and make the affected test behavior match environments without those mounts; done means the relevant test suites pass or correctly handle the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.