mirror of
https://github.com/containers/youki
synced 2024-11-23 01:11:58 +01:00
Ensure parents have value
This commit is contained in:
parent
ca3e9f27f6
commit
b9ae5b7cd6
@ -18,13 +18,13 @@ impl Controller for CpuSet {
|
||||
log::debug!("Apply CpuSet cgroup config");
|
||||
fs::create_dir_all(cgroup_path)?;
|
||||
|
||||
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_CPUS)?;
|
||||
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_MEMS)?;
|
||||
|
||||
if let Some(cpuset) = &linux_resources.cpu {
|
||||
Self::apply(cgroup_path, cpuset)?;
|
||||
}
|
||||
|
||||
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_CPUS)?;
|
||||
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_MEMS)?;
|
||||
|
||||
common::write_cgroup_file(cgroup_path.join(CGROUP_PROCS), pid)?;
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user