diff options
author | Nicolas Vollmar <nvollmar@gmail.com> | 2024-06-09 22:59:26 +0200 |
---|---|---|
committer | Nicolas Vollmar <nvo@scaling.ch> | 2024-06-10 11:24:32 +0200 |
commit | f030464952168b553b5b3e29b461d437c2642a9b (patch) | |
tree | 8c3f8f5749417164618f6dc68968b92ed648b367 /smoketest | |
parent | 717ea64e4c54a8be619ffc29c16c6203b29319dd (diff) | |
download | vyos-1x-f030464952168b553b5b3e29b461d437c2642a9b.tar.gz vyos-1x-f030464952168b553b5b3e29b461d437c2642a9b.zip |
T6219: align with system sysctl and limit parameters to supported
Diffstat (limited to 'smoketest')
-rw-r--r-- | smoketest/config-tests/container-simple | 2 | ||||
-rw-r--r-- | smoketest/configs/container-simple | 6 | ||||
-rwxr-xr-x | smoketest/scripts/cli/test_container.py | 5 |
3 files changed, 10 insertions, 3 deletions
diff --git a/smoketest/config-tests/container-simple b/smoketest/config-tests/container-simple index ced770421..5af365cf9 100644 --- a/smoketest/config-tests/container-simple +++ b/smoketest/config-tests/container-simple @@ -11,4 +11,4 @@ set container name c02 allow-host-networks set container name c02 allow-host-pid set container name c02 capability 'sys-time' set container name c02 image 'busybox:stable' -set container name c02 kernel-parameter 'net.ipv4.conf.all.forwarding' value '1'
\ No newline at end of file +set container name c02 sysctl parameter kernel.msgmax value '8192'
\ No newline at end of file diff --git a/smoketest/configs/container-simple b/smoketest/configs/container-simple index 0585fed29..b98a440b5 100644 --- a/smoketest/configs/container-simple +++ b/smoketest/configs/container-simple @@ -10,8 +10,10 @@ container { allow-host-pid cap-add sys-time image busybox:stable - kernel-parameter "net.ipv4.ip_forward" { - value "1" + sysctl { + parameter kernel.msgmax { + value "8192" + } } } } diff --git a/smoketest/scripts/cli/test_container.py b/smoketest/scripts/cli/test_container.py index 90f821c60..3dd97a175 100755 --- a/smoketest/scripts/cli/test_container.py +++ b/smoketest/scripts/cli/test_container.py @@ -80,6 +80,7 @@ class TestContainer(VyOSUnitTestSHIM.TestCase): self.cli_set(base_path + ['name', cont_name, 'image', cont_image]) self.cli_set(base_path + ['name', cont_name, 'allow-host-networks']) + self.cli_set(base_path + ['name', cont_name, 'sysctl', 'parameter', 'kernel.msgmax', 'value', '4096']) # commit changes self.cli_commit() @@ -91,6 +92,10 @@ class TestContainer(VyOSUnitTestSHIM.TestCase): # Check for running process self.assertEqual(process_named_running(PROCESS_NAME), pid) + # verify + tmp = cmd(f'sudo podman exec -it {cont_name} sysctl kernel.msgmax') + self.assertEqual(tmp, 'kernel.msgmax = 4096') + def test_cpu_limit(self): cont_name = 'c2' |