hashicorp / nomad-driver-virt

Mozilla Public License 2.0
8 stars 1 forks source link

Set the correct number of vcpus based on the reserved cores #39

Closed Juanadelacuesta closed 4 weeks ago

Juanadelacuesta commented 1 month ago

Currently the number of CPUs is taking from the Nomad cpuShares in resources block, which is defined as: "Specifies the CPU required to run this task in MHz", it doesn't translate well to vCPUs and, because cores and cpus can't both be set at the same time, disables the possibility of using specific reserved cores. This PR makes the cores calculation based on the cores field.