Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Furisto committed Jun 8, 2021
1 parent 5b2121f commit dc73573
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/cgroups/v1/cpuset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ impl Controller for CpuSet {
log::debug!("Apply CpuSet cgroup config");
fs::create_dir_all(cgroup_path)?;

log::debug!("ENSURE NOT EMPTY");
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 {
log::debug!("HANDLE APPLY");
Self::apply(cgroup_path, cpuset)?;
}

Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_CPUS)?;
Self::ensure_not_empty(cgroup_path, CGROUP_CPUSET_MEMS)?;

log::debug!("WRITE CGROUP PROCS");
common::write_cgroup_file(cgroup_path.join(CGROUP_PROCS), pid)?;
Ok(())
}
Expand Down

0 comments on commit dc73573

Please sign in to comment.