Skip to content

Commit

Permalink
Merge pull request moby#23447 from Microsoft/RemoveQosValidation
Browse files Browse the repository at this point in the history
Removed QoS validation on Windows
  • Loading branch information
John Howard authored Jun 13, 2016
2 parents 5338ae7 + ea3a789 commit bfed05b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/reference/api/docker_remote_api_v1.24.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ Json Parameters:
- **CpuQuota** - Microseconds of CPU time that the container can get in a CPU period.
- **CpusetCpus** - String value containing the `cgroups CpusetCpus` to use.
- **CpusetMems** - Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.
- **MaximumIOps** - Maximum IO absolute rate in terms of IOps. MaximumIOps and MaximumIOBps are mutually exclusive settings.
- **MaximumIOBps** - Maximum IO absolute rate in terms of bytes per second. MaximumIOps and MaximumIOBps are mutually exclusive settings.
- **MaximumIOps** - Maximum IO absolute rate in terms of IOps.
- **MaximumIOBps** - Maximum IO absolute rate in terms of bytes per second.
- **BlkioWeight** - Block IO weight (relative weight) accepts a weight value between 10 and 1000.
- **BlkioWeightDevice** - Block IO weight (relative device weight) in the form of: `"BlkioWeightDevice": [{"Path": "device_path", "Weight": weight}]`
- **BlkioDeviceReadBps** - Limit read rate (bytes per second) from a device in the form of: `"BlkioDeviceReadBps": [{"Path": "device_path", "Rate": rate}]`, for example:
Expand Down
1 change: 0 additions & 1 deletion runconfig/hostconfig_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func ValidateIsolation(hc *container.HostConfig) error {
}

// ValidateQoS performs platform specific validation of the QoS settings
// a disk can be limited by either Bps or IOps, but not both.
func ValidateQoS(hc *container.HostConfig) error {
return nil
}
5 changes: 2 additions & 3 deletions runconfig/hostconfig_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,18 @@ func ValidateIsolation(hc *container.HostConfig) error {
}

// ValidateQoS performs platform specific validation of the QoS settings
// a disk can be limited by either Bps or IOps, but not both.
func ValidateQoS(hc *container.HostConfig) error {
// We may not be passed a host config, such as in the case of docker commit
if hc == nil {
return nil
}

if hc.IOMaximumBandwidth != 0 {
return fmt.Errorf("invalid QoS settings: %s does not support --maximum-bandwidth", runtime.GOOS)
return fmt.Errorf("invalid QoS settings: %s does not support --io-maxbandwidth", runtime.GOOS)
}

if hc.IOMaximumIOps != 0 {
return fmt.Errorf("invalid QoS settings: %s does not support --maximum-iops", runtime.GOOS)
return fmt.Errorf("invalid QoS settings: %s does not support --io-maxiops", runtime.GOOS)
}
return nil
}
9 changes: 0 additions & 9 deletions runconfig/hostconfig_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ func ValidateIsolation(hc *container.HostConfig) error {
}

// ValidateQoS performs platform specific validation of the Qos settings
// a disk can be limited by either Bps or IOps, but not both.
func ValidateQoS(hc *container.HostConfig) error {
// We may not be passed a host config, such as in the case of docker commit
if hc == nil {
return nil
}

if hc.IOMaximumIOps != 0 && hc.IOMaximumBandwidth != 0 {
return fmt.Errorf("invalid QoS settings: maximum bandwidth and maximum iops cannot both be set")
}
return nil
}

0 comments on commit bfed05b

Please sign in to comment.