Added --cpus option support.
What does this MR do?
Adds CPUS option for docker runner.
Why was this MR needed?
Adds support for the --cpus option available in Docker 1.13. This allows limit number of CPUs available to each docker container.
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
-
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Branch has no merge conflicts with master
(if you do - rebase it please)
What are the relevant issue numbers?
- #2101 (closed) -- Support Docker 1.13 --cpus option
Merge request reports
Activity
@sashk I don't think so. I plan to switch to Docker 1.13 client.
As for the MR - let's wait until !301 (merged) is merged. In the meanwhile could you rebase this on top of !301 (merged)?
changed milestone to %v1.11
added executordocker label
added 5 commits
- 32b9fc08 - Update Godeps
- 38dff79d - Move from github.com/fsouza/go-dockerclient to github.com/docker/docker
- e90e531a - Simplify the ImagePull call
- 8abea7f2 - Fix an intermittent test failure
- b8577767 - Added --cpus option support.
Toggle commit list@tmaczukin I've rebased on top of !301 (merged).
changed milestone to %v9.0
changed milestone to %v9.1
- Resolved by Tomasz Maczukin
@sashk Looking at https://github.com/docker/docker/pull/27958/files where
--cpus
was added, it looks thatHostConfig
in the dependency used by us already has support for this withNanoCPUs
field. This is only the matter of translating the value set by--cpus
option (which is a string) to theNanoCPUs
(which is a int64). And this is basically done here https://github.com/docker/docker/pull/27958/files#diff-def63b7f78492fa1f0dc4e219a650df4R333 so I think we should simply use theNanoCPUs
type from github.com/docker/docker/opts/opts.go.changed milestone to %Backlog
changed milestone to %v9.2
@tmaczukin probably you're right. feel free to take over this form me.
I've played with the
--cpus
option awhile back and figured out it didn't work the way I needed, so I came up with home-grown workaround which suits my needs.changed milestone to %9.3
mentioned in merge request !586 (merged)
Closing in favor of !586 (merged)