Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Furisto committed Nov 24, 2021
1 parent 4192841 commit 9cff024
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions crates/libcgroups/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,6 @@ pub fn create_cgroup_manager<P: Into<PathBuf>>(

match cgroup_setup {
CgroupSetup::Legacy | CgroupSetup::Hybrid => {
if systemd_cgroup {
bail!("resource control with systemd is not supported on cgroup v1");
}

log::info!("cgroup manager V1 will be used");
Ok(Box::new(v1::manager::Manager::new(cgroup_path.into())?))
}
Expand Down
4 changes: 2 additions & 2 deletions crates/libcgroups/src/systemd/dbus/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl SystemdClient for Client {
let cgroup_root = proxy
.control_group()
.context("failed to get systemd control group")?;
PathBuf::try_from(cgroup_root)
.with_context(|| format!("parse systemd control cgroup into path"))
PathBuf::try_from(&cgroup_root)
.with_context(|| format!("parse systemd control cgroup {} into path", cgroup_root))
}
}
4 changes: 0 additions & 4 deletions crates/libcgroups/src/systemd/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,6 @@ impl CgroupManager for Manager {
)
})?;

let cg = self.client.control_cgroup_root().context("cgroup root")?;
log::debug!("CONTROL GROUP ROOT: {:?}", cg);
log::debug!("MANAGER {:?}", self);

Ok(())
}

Expand Down

0 comments on commit 9cff024

Please sign in to comment.