Wednesday, 2021-10-27

kata-irc-bot<bergwolf> Hi folks, the recap of the last week's vPTG is alive on kata blog. Thank you for attending the meeting and sharing all the valuable thoughts! https://medium.com/kata-containers/kata-containers-vptg-community-gathering-new-features-and-a-glimpse-of-kata-3-0-7ba025025e9e02:45
kata-irc-bot<fidencio> @bergwolf, @samuel.ortiz, thanks for leading this PTG! And @bergwolf, thanks for the nice write up!07:27
kata-irc-bot<samuel.ortiz> Hey @ssheribe09:14
kata-irc-bot<samuel.ortiz> I will look at it today. We should have a way to dynamically find which cgroup configuration the host is running.09:15
kata-irc-bot<ssheribe> Thanks @samuel.ortiz!, IsSystemdCgroup seems to know that, so I was trying to adapt the following api calls to systemd but it didn't work :S09:22
kata-irc-bot<samuel.ortiz> @ssheribe You mean the old `IsSystemCgroup` from the previous cgroup package: https://github.com/kata-containers/kata-containers/blob/stable-2.1/src/runtime/virtcontainers/pkg/cgroups/utils.go#L62 ?10:04
kata-irc-bot<ssheribe> @samuel.ortiz well, yes, it was copied to vircontainers, still valid IIUC https://github.com/kata-containers/kata-containers/blob/4d4a15d6ce0c1f4009ca20e2c32ac449f6d0c784/src/runtime/virtcontainers/pkg/cgroups/utils.go#L6110:11
kata-irc-bot<samuel.ortiz> Right, it is still valid.10:13
kata-irc-bot<samuel.ortiz> And so something like: ```diff --git a/src/runtime/virtcontainers/pkg/cgroups/cgroups.go b/src/runtime/virtcontainers/pkg/cgroups/cgroups.go index 97826671..e9f08629 100644 --- a/src/runtime/virtcontainers/pkg/cgroups/cgroups.go +++ b/src/runtime/virtcontainers/pkg/cgroups/cgroups.go @@ -116,13 +116,19 @@ func sandboxDevices() []specs.LinuxDeviceCgroup {    func NewCgroup(path string, resources *specs.LinuxResources) (*Cgroup,10:19
kata-irc-boterror) {         var err error +       var cgroup cgroups.Cgroup           cgroupPath, err := ValidCgroupPath(path, IsSystemdCgroup(path))         if err != nil {                 return nil, err         }   -       cgroup, err := cgroups.New(cgroups.V1, cgroups.StaticPath(cgroupPath), resources) +       if !IsSystemdCgroup(path) { +               cgroup, err = cgroups.New(cgroups.V1, cgroups.StaticPath(cgroupPath), resources) +       } else { +   10:19
kata-irc-bot           cgroup, err = cgroups.New(cgroups.Systemd, cgroups.Slice("system.slice", "kata"), resources) +       } +         if err != nil {                 return nil, err         }```10:19
kata-irc-bot<samuel.ortiz> does not work for you?10:20
kata-irc-bot<samuel.ortiz> @ssheribe lunch break, I’ll bbl10:21
kata-irc-bot<ssheribe> I get "CreateContainer failed: Could not create the sandbox cgroup Invalid unit name or type.: unknown"10:56
kata-irc-bot<gkurz> @ssheribe It works for me... but metrix still seem wrong13:11
kata-irc-bot<gkurz> I don't understand why the systemd branch doesn't use the path14:25

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!