Skip to content
Snippets Groups Projects

Added --cpus option support.

Closed username-removed-15146 requested to merge sashk/gitlab-ci-multi-runner:issue2101 into master
All threads resolved!

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?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @sashk Looking at https://github.com/docker/docker/pull/27958/files where --cpus was added, it looks that HostConfig in the dependency used by us already has support for this with NanoCPUs field. This is only the matter of translating the value set by --cpus option (which is a string) to the NanoCPUs (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 the NanoCPUs type from github.com/docker/docker/opts/opts.go.

  • Tomasz Maczukin changed milestone to %Backlog

    changed milestone to %Backlog

  • Tomasz Maczukin changed milestone to %v9.2

    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.

  • Tomasz Maczukin changed milestone to %9.3

    changed milestone to %9.3

  • Tomasz Maczukin resolved all discussions

    resolved all discussions

  • Tomasz Maczukin mentioned in merge request !586 (merged)

    mentioned in merge request !586 (merged)

  • Closing in favor of !586 (merged)

  • Please register or sign in to reply
    Loading