Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
virtcontainers: apply devices constraints
Browse files Browse the repository at this point in the history
Apply devices constraints to the container in the virtual machine

fixes #656

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes committed Aug 29, 2018
1 parent a303892 commit 137769a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ func constraintGRPCSpec(grpcSpec *grpc.Spec) {
// By now only CPU constraints are supported
// Issue: https://github.com/kata-containers/runtime/issues/158
// Issue: https://github.com/kata-containers/runtime/issues/204
grpcSpec.Linux.Resources.Devices = nil
grpcSpec.Linux.Resources.Pids = nil
grpcSpec.Linux.Resources.BlockIO = nil
grpcSpec.Linux.Resources.HugepageLimits = nil
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/kata_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func TestConstraintGRPCSpec(t *testing.T) {
// check nil fields
assert.Nil(g.Hooks)
assert.Nil(g.Linux.Seccomp)
assert.Nil(g.Linux.Resources.Devices)
assert.NotNil(g.Linux.Resources.Devices)
assert.NotNil(g.Linux.Resources.Memory)
assert.Nil(g.Linux.Resources.Pids)
assert.Nil(g.Linux.Resources.BlockIO)
Expand Down

0 comments on commit 137769a

Please sign in to comment.