diff --git a/client/driver/rkt.go b/client/driver/rkt.go index 3dbcea8a0..c670d42bc 100644 --- a/client/driver/rkt.go +++ b/client/driver/rkt.go @@ -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)))