Skip to content

Commit

Permalink
Updated Throttle Read/Write to match upstream changes in runc; now ta…
Browse files Browse the repository at this point in the history
…kes a list of ThrottleDevice structs instead of an int
  • Loading branch information
cbednarski authored and dadgar committed Oct 6, 2015
1 parent bfbdd19 commit 095dc9a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/executor/exec_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 095dc9a

Please sign in to comment.