Commit Graph

5 Commits

Author SHA1 Message Date
David Porter
6639b2b028 test: Add ability to switch between cgroupv1 or cgroupv2
For k8s e2e node tests, we want to be able to test both cgroupv1 and
cgroupv2 variants. Currently, the latest version of COS (M97) is running
as cgroupv2 and we would like the add the ability to switch to cgroupv1
for running tests on cgroupv1.

To do this, add a new flag, "CGROUP_MODE" which can be set as v1 or v2.
If the current cgroup configuration does not match the desired config,
the cgroup config will be set via `cgroup_helper` COS utility, and the
node will be rebooted.

Signed-off-by: David Porter <porterdavid@google.com>
2022-07-19 17:51:41 -07:00
David Porter
bdc852190b test: e2e node COS cgroupv2 script
On newer COS M97 images, cgroupv2 is enabled out of the box. It is
enabled using default systemd configuration and does not have
`systemd.unified_cgroup_hierarchy` present `/proc/cmdline`. As a result, the
check for manual cgroupv2 enablement should be improved to not only check
`/proc/cmdline`, but also to see if it's enabled on the system using `stat
-fc %T /sys/fs/cgroup/`

Signed-off-by: David Porter <porterdavid@google.com>
2022-01-08 16:03:42 -08:00
Jiaming Xu
b9a0c5080a modify the way for checking cos
Signed-off-by: Jiaming Xu <jiamingxu@google.com>

address feedback

remove empty spaces

address feedbacks
2021-10-05 22:25:39 +00:00
Jiaming Xu
1dada3fc2a add cgroupv2 setup for cos with a flag
Signed-off-by: Jiaming Xu <jiamingxu@google.com>

address feedbacks
2021-06-16 14:37:44 -04:00
Derek McGowan
3a6009c001
Update test build script to push containerd variant
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-08 16:32:32 -07:00