mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
rustjail: fix the issue of missing destroy contaienr cgroups
In the container's destroy method, it should destroy the container's cgroups. Fixes: #1291 Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
This commit is contained in:
parent
2a990a4507
commit
6abb1be724
@ -1039,6 +1039,10 @@ impl BaseContainer for LinuxContainer {
|
||||
MntFlags::MNT_DETACH,
|
||||
)?;
|
||||
fs::remove_dir_all(&self.root)?;
|
||||
|
||||
if let Some(cgm) = self.cgroup_manager.as_mut() {
|
||||
cgm.destroy().context("destroy cgroups")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user