diff --git a/virtcontainers/kata_agent.go b/virtcontainers/kata_agent.go index 717acb3449..761155dca3 100644 --- a/virtcontainers/kata_agent.go +++ b/virtcontainers/kata_agent.go @@ -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 diff --git a/virtcontainers/kata_agent_test.go b/virtcontainers/kata_agent_test.go index e4892f7fc6..56532a3f34 100644 --- a/virtcontainers/kata_agent_test.go +++ b/virtcontainers/kata_agent_test.go @@ -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)