mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-04 19:16:23 +00:00
Merge pull request #4713 from openanolis/adjust_default_vcpu
runtime-rs: handle default_vcpus greator than default_maxvcpu
This commit is contained in:
commit
71384b60f3
@ -65,6 +65,10 @@ impl ConfigPlugin for DragonballConfig {
|
|||||||
db.cpu_info.default_maxvcpus = default::MAX_DRAGONBALL_VCPUS;
|
db.cpu_info.default_maxvcpus = default::MAX_DRAGONBALL_VCPUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if db.cpu_info.default_vcpus as u32 > db.cpu_info.default_maxvcpus {
|
||||||
|
db.cpu_info.default_vcpus = db.cpu_info.default_maxvcpus as i32;
|
||||||
|
}
|
||||||
|
|
||||||
if db.machine_info.entropy_source.is_empty() {
|
if db.machine_info.entropy_source.is_empty() {
|
||||||
db.machine_info.entropy_source =
|
db.machine_info.entropy_source =
|
||||||
default::DEFAULT_DRAGONBALL_ENTROPY_SOURCE.to_string();
|
default::DEFAULT_DRAGONBALL_ENTROPY_SOURCE.to_string();
|
||||||
|
Loading…
Reference in New Issue
Block a user