mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
agent/sandbox: Don't update cpuset when ncpus = 0
When receiving an OnlineCpuMemory RPC, if the number of CPUs to be made available is 0, then updating the cpusets is a redundant operation. Fixes: #1172 Signed-off-by: Maruth Goyal <maruthgoyal@gmail.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
9117dd409e
commit
662e8db5dd
@ -233,6 +233,10 @@ impl Sandbox {
|
||||
online_memory(&self.logger)?;
|
||||
}
|
||||
|
||||
if req.nb_cpus == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let cpuset = rustjail_cgroups::fs::get_guest_cpuset()?;
|
||||
|
||||
for (_, ctr) in self.containers.iter() {
|
||||
|
Loading…
Reference in New Issue
Block a user