Merge pull request #9195 from UiPath/fix/vcpus-for-static-mgmt

runtime: Set maxvcpus equal to vcpus for the static resources case
This commit is contained in:
Hyounggyu Choi 2024-11-14 09:38:20 +01:00 committed by GitHub
commit 5869046d04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1100,6 +1100,8 @@ func SandboxConfig(ocispec specs.Spec, runtime RuntimeConfig, bundlePath, cid st
sandboxConfig.HypervisorConfig.NumVCPUsF += sandboxConfig.SandboxResources.WorkloadCPUs
sandboxConfig.HypervisorConfig.MemorySize += sandboxConfig.SandboxResources.WorkloadMemMB
sandboxConfig.HypervisorConfig.DefaultMaxVCPUs = sandboxConfig.HypervisorConfig.NumVCPUs()
ociLog.WithFields(logrus.Fields{
"workload cpu": sandboxConfig.SandboxResources.WorkloadCPUs,
"default cpu": sandboxConfig.SandboxResources.BaseCPUs,