Skip to content

fix(plugins/container): recognize systemd nerdctl cgroups#1378

Open
leogr wants to merge 1 commit into
mainfrom
fix/container-nerdctl-systemd-cgroup
Open

fix(plugins/container): recognize systemd nerdctl cgroups#1378
leogr wants to merge 1 commit into
mainfrom
fix/container-nerdctl-systemd-cgroup

Conversation

@leogr
Copy link
Copy Markdown
Member

@leogr leogr commented May 29, 2026

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area plugins

/area registry

/area build

/area documentation

/area automation

What this PR does / why we need it:

Containers started with nerdctl on systemd-managed containerd run under /system.slice/nerdctl-<id>.scope. The container plugin discovers them from the containerd runtime event, but syscall events were still attributed to container.id=host, since no matcher recognized that leaf - the 64-hex id is wrapped by the nerdctl- prefix and .scope suffix, so the runc extractor discards it.

This adds a single {"/nerdctl-", ".scope"} entry to CRI_CGROUP_LAYOUT, mirroring the existing cri-containerd-/docker- systemd scopes, plus a nerdctl_systemd_scope unit test. No new logic, it just reuses the existing 64-hex runc extractor.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
@poiana
Copy link
Copy Markdown
Contributor

poiana commented May 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions
Copy link
Copy Markdown

Rules files suggestions

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