mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 15:02:45 +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>
This commit is contained in:
parent
e167bf30e3
commit
4af5beda35
@ -233,6 +233,10 @@ impl Sandbox {
|
||||
online_memory(&self.logger)?;
|
||||
}
|
||||
|
||||
if req.nb_cpus == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let guest_cpuset = rustjail_cgroups::fs::get_guest_cpuset()?;
|
||||
|
||||
for (_, ctr) in self.containers.iter() {
|
||||
|
Loading…
Reference in New Issue
Block a user