Skip to content

Commit

Permalink
add cpuset support
Browse files Browse the repository at this point in the history
  • Loading branch information
n8wb committed Jul 24, 2020
1 parent 39c175c commit c8e28ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ require (
github.com/stretchr/testify v1.5.1
github.com/theupdateframework/notary v0.6.1 // indirect
github.com/whiteblock/amqp v1.3.2
github.com/whiteblock/definition v0.0.0-20200722162537-0998ad45ff87
github.com/whiteblock/definition v0.0.0-20200724170201-eca0f9033dc6
github.com/whiteblock/utility v0.0.0-20200608214746-1060924406d9
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ github.com/whiteblock/definition v0.0.0-20200627153902-dd101ca5afe9 h1:fcheh+UD9
github.com/whiteblock/definition v0.0.0-20200627153902-dd101ca5afe9/go.mod h1:vrnv6k/2svggN0KdHDBm+oEe21+xmosW0Lflu78V4rg=
github.com/whiteblock/definition v0.0.0-20200722162537-0998ad45ff87 h1:6Phk9SwpxQ83yUz8mSi9DzzmhjcyI7M98JDwkNqMbpU=
github.com/whiteblock/definition v0.0.0-20200722162537-0998ad45ff87/go.mod h1:vrnv6k/2svggN0KdHDBm+oEe21+xmosW0Lflu78V4rg=
github.com/whiteblock/definition v0.0.0-20200724170201-eca0f9033dc6 h1:iaCjtWsdBGkTzhAFFm/5qcUz1qd/vvqHW3SVrLInMm4=
github.com/whiteblock/definition v0.0.0-20200724170201-eca0f9033dc6/go.mod h1:vrnv6k/2svggN0KdHDBm+oEe21+xmosW0Lflu78V4rg=
github.com/whiteblock/go-prettyjson v0.0.0-20180920040306-f579f869bbfe/go.mod h1:DiL8S7+O7oZaiYO5wOEHtZ9+0jIjA/hawX2HrVwHutM=
github.com/whiteblock/go.uuid v1.2.1 h1:prUjjtzVGGZ0A1Jt3yGxFIdTD69u9FGwaU3e73xqFeI=
github.com/whiteblock/go.uuid v1.2.1/go.mod h1:J0Y9qymnDEwrdEFeIzpsul8Ye1jzfPoW3JDJVx8hdGM=
Expand Down
1 change: 1 addition & 0 deletions pkg/service/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ func (ds dockerService) CreateContainer(ctx context.Context, cli entity.DockerCl
}
hostConfig.NanoCPUs = int64(1000000000 * cpus)
hostConfig.Memory = mem
hostConfig.CpusetCpus = dContainer.GetCPUSet()

networkConfig := &network.NetworkingConfig{EndpointsConfig: map[string]*network.EndpointSettings{}}
if len(dContainer.Network) > 0 {
Expand Down

0 comments on commit c8e28ed

Please sign in to comment.