Skip to content

SystemdCgroup is not present in default config even though it is a supported key for runtimes.runc.options #12101

@akhilerm

Description

@akhilerm

Description

The following configuration is used to set the cgroup driver to systemd in containerd.

version = 3
[plugins]
  [plugins.'io.containerd.cri.v1.runtime']
    [plugins.'io.containerd.cri.v1.runtime'.containerd]
      [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes]
        [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc]
          [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options]
            SystemdCgroup = true

But the configuration generated by containerd config default does not show the SystemdCgroup key even though it is supported and set to false.

Steps to reproduce the issue

  1. build containerd from main branch 22b1db9
  2. generate the default config
$ bin/containerd config default 
.
.
          [plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options]
            BinaryName = ''
            CriuImagePath = ''
            CriuWorkPath = ''
            IoGid = 0
            IoUid = 0
            NoNewKeyring = false
            Root = ''
            ShimCgroup = ''

Describe the results you received and expected

The default config should have the SystemdCgroup as a key with value set to false

What version of containerd are you using?

containerd github.com/containerd/containerd/v2 v2.1.0-211-g22b1db963 22b1db9

Any other relevant information

On bisecting the code, this change happened as part of 07c2ae1, where runc v1 types where removed.

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/criContainer Runtime Interface (CRI)kind/bug

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions