kata-containers / cgroups-rs

Native Rust library for managing control groups under Linux
https://crates.io/crates/cgroups-rs
Other
114 stars 45 forks source link

Cgroup not being created on Ubuntu 20 #96

Closed Valentine-Mario closed 1 year ago

Valentine-Mario commented 1 year ago

The Cgroup builder does not seem to create the group on Ubuntu 20 code sample:

let cgs = CgroupBuilder::new(name)
        .cpu().shares(256).done()
        .memory().kernel_memory_limit(KMEM_LIMIT).memory_hard_limit(MEM_LIMIT).done()
        .pid().maximum_number_of_processes(MAX_PID).done()
        .blkio().weight(50).done()
        .build(Box::new(V2::new()));