mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
dragonball: Don't fail if a request asks for more CPUs than allowed
Let's take the same approach of the go runtime, instead, and allocate the maximum allowed number of vcpus instead. Fixes: #7270 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
38f0aaa516
commit
96e9374d4b
@ -341,7 +341,10 @@ impl DragonballInner {
|
||||
|
||||
// cannot exceed maximum value
|
||||
if new_vcpus > self.config.cpu_info.default_maxvcpus {
|
||||
return Err(anyhow!("resize vcpu error: cannot greater than maxvcpus"));
|
||||
warn!(
|
||||
sl!(),
|
||||
"Cannot allocate more vcpus than the max allowed number of vcpus. The maximum allowed amount of vcpus will be used instead.");
|
||||
return Ok((current_vcpus, self.config.cpu_info.default_maxvcpus));
|
||||
}
|
||||
|
||||
Ok((current_vcpus, new_vcpus))
|
||||
|
Loading…
Reference in New Issue
Block a user