mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Updated Throttle Read/Write to match upstream changes in runc; now takes a list of ThrottleDevice structs instead of an int
This commit is contained in:
committed by
Alex Dadgar
parent
bfbdd19e1c
commit
095dc9ae57
@@ -205,8 +205,11 @@ func (e *LinuxExecutor) configureCgroups(resources *structs.Resources) {
|
||||
}
|
||||
|
||||
if resources.IOPS > 0 {
|
||||
e.groups.BlkioThrottleReadIOpsDevice = strconv.FormatInt(int64(resources.IOPS), 10)
|
||||
e.groups.BlkioThrottleWriteIOpsDevice = strconv.FormatInt(int64(resources.IOPS), 10)
|
||||
throttleDevice := &cgroupConfig.ThrottleDevice{
|
||||
Rate: uint64(resources.IOPS),
|
||||
}
|
||||
e.groups.BlkioThrottleReadIOPSDevice = append(e.groups.BlkioThrottleReadIOPSDevice, throttleDevice)
|
||||
e.groups.BlkioThrottleWriteIOPSDevice = append(e.groups.BlkioThrottleWriteIOPSDevice, throttleDevice)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user