mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-14 15:44:58 +00:00
runtime/virtcontainers: Pass the hugepages resources to agent
The hugepages resources claimed by containers should be limited
by cgroup in the guest OS.
Fixes: #3695
Signed-off-by: Miao Xia <xia.miao1@zte.com.cn>
(cherry picked from commit a2f5c1768e
)
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
c9e1f72785
commit
aedfef29a3
@ -910,7 +910,6 @@ func (k *kataAgent) constrainGRPCSpec(grpcSpec *grpc.Spec, passSeccomp bool, str
|
||||
grpcSpec.Linux.Resources.Devices = nil
|
||||
grpcSpec.Linux.Resources.Pids = nil
|
||||
grpcSpec.Linux.Resources.BlockIO = nil
|
||||
grpcSpec.Linux.Resources.HugepageLimits = nil
|
||||
grpcSpec.Linux.Resources.Network = nil
|
||||
if grpcSpec.Linux.Resources.CPU != nil {
|
||||
grpcSpec.Linux.Resources.CPU.Cpus = ""
|
||||
|
@ -609,7 +609,7 @@ func TestConstrainGRPCSpec(t *testing.T) {
|
||||
assert.NotNil(g.Linux.Resources.Memory)
|
||||
assert.Nil(g.Linux.Resources.Pids)
|
||||
assert.Nil(g.Linux.Resources.BlockIO)
|
||||
assert.Nil(g.Linux.Resources.HugepageLimits)
|
||||
assert.Len(g.Linux.Resources.HugepageLimits, 0)
|
||||
assert.Nil(g.Linux.Resources.Network)
|
||||
assert.NotNil(g.Linux.Resources.CPU)
|
||||
assert.Equal(g.Process.SelinuxLabel, "")
|
||||
|
Loading…
Reference in New Issue
Block a user