rkt.driver: Fix wrong MB calculation
This commit is contained in:
parent
461c172e0f
commit
d0ccdacd08
|
@ -39,9 +39,6 @@ const (
|
|||
// version to maintain an uniform interface across all drivers
|
||||
minRktVersion = "0.14.0"
|
||||
|
||||
// bytesToMB is the conversion from bytes to megabytes.
|
||||
bytesToMB = 1024 * 1024
|
||||
|
||||
// The key populated in the Node Attributes to indicate the presence of the
|
||||
// Rkt driver
|
||||
rktDriverAttr = "driver.rkt"
|
||||
|
@ -241,7 +238,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
|
|||
}
|
||||
|
||||
// Add memory isolator
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--memory=%vM", int64(task.Resources.MemoryMB)*bytesToMB))
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--memory=%vM", int64(task.Resources.MemoryMB)))
|
||||
|
||||
// Add CPU isolator
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--cpu=%vm", int64(task.Resources.CPU)))
|
||||
|
|
Loading…
Reference in a new issue