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

Question: Read-only filesystem issue #125

Open yizhuoliang opened 1 year ago

yizhuoliang commented 1 year ago

When i tried to run the example code, the cgroups builder panicked with this error

root@b728d2fea702:/test_rust/src# cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
     Running `/test_rust/target/debug/test_rust`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: FsError, cause: Some(Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }) }', src/main.rs:16:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I'm not sure if this is some problem with my docker container (minimal rust image). I also want to ask, where are the code that actually edits the linux cgroups information. Thank you!