using d.node.Resources.CPU as suggested

This commit is contained in:
Jainin Shah 2018-02-06 14:52:15 -08:00
parent 94d0ce6006
commit d3087d6069
1 changed files with 1 additions and 1 deletions

View File

@ -1132,7 +1132,7 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas
// Calculate CPU Quota
if driverConfig.CPUHardLimit {
percentTicks := float64(task.Resources.CPU) / shelpers.TotalTicksAvailable()
percentTicks := float64(task.Resources.CPU) / float64(d.node.Resources.CPU)
hostConfig.CPUQuota = int64(percentTicks * defaultCFSPeriod)
}