-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update run test windows #587
fix: update run test windows #587
Conversation
Signed-off-by: Vishwas Siravara <vsiravar@gmail.com>
e2e/container/container_test.go
Outdated
if runtime.GOOS == "windows" { | ||
// wsl2 cgroup v2 is mounted at /sys/fs/cgroup/unified, | ||
// containerd expects it at /sys/fs/cgroup based on https://github.com/containerd/cgroups/blob/cc78c6c1e32dc5bde018d92999910fdace3cfa27/utils.go#L36 | ||
tests.Run(&tests.RunOption{BaseOpt: o, CGMode: tests.Unavailable, DefaultHostGatewayIP: "192.168.5.2"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling cgroup v2 requires extra tweaks in wsl 2 based on https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2
This mentions that WSL has both cgroups v1 and cgroups v2 enabled. Could we instead use hybrid mode?
tests.Run(&tests.RunOption{BaseOpt: o, CGMode: tests.Unavailable, DefaultHostGatewayIP: "192.168.5.2"}) | |
tests.Run(&tests.RunOption{BaseOpt: o, CGMode: tests.Hybrid, DefaultHostGatewayIP: "192.168.5.2"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think this is correct. From the findmnt output:
├─/sys sysfs sysfs rw,nosuid,nodev,noexec,noatime
│ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode
│ │ ├─/sys/fs/cgroup/unified cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate
│ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
│ │ ├─/sys/fs/cgroup/cpu cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu
│ │ ├─/sys/fs/cgroup/cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuacct
│ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
│ │ ├─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
│ │ ├─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
│ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/net_cls cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls
│ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime,perf_event
│ │ ├─/sys/fs/cgroup/net_prio cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_prio
│ │ ├─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatime,hugetlb
│ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime,pids
│ │ ├─/sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec,relatime,rdma
│ │ ├─/sys/fs/cgroup/misc cgroup cgroup rw,nosuid,nodev,noexec,relatime,misc
│ │ └─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd
Signed-off-by: Vishwas Siravara <vsiravar@gmail.com>
Issue #, if available: *Description of changes:* Update run tests related to cgroup v2 resource flag tests for windows. In wsl2 cgroup v2 is mounted at /sys/fs/cgroup/unified but containerd expects it to be mounted at /sys/fs/cgroup https://github.com/containerd/cgroups/blob/cc78c6c1e32dc5bde018d92999910fdace3cfa27/utils.go#L36. Enabling cgroup v2 requires extra tweaks in wsl 2 based on https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2 *Testing done:* Yes. - [X] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: Vishwas Siravara <vsiravar@gmail.com> Co-authored-by: Vishwas Siravara <vsiravar@gmail.com>
Issue #, if available: *Description of changes:* Update run tests related to cgroup v2 resource flag tests for windows. In wsl2 cgroup v2 is mounted at /sys/fs/cgroup/unified but containerd expects it to be mounted at /sys/fs/cgroup https://github.com/containerd/cgroups/blob/cc78c6c1e32dc5bde018d92999910fdace3cfa27/utils.go#L36. Enabling cgroup v2 requires extra tweaks in wsl 2 based on https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2 *Testing done:* Yes. - [X] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: Vishwas Siravara <vsiravar@gmail.com> Co-authored-by: Vishwas Siravara <vsiravar@gmail.com> Signed-off-by: Vishwas Siravara <siravara@amazon.com>
Issue #, if available:
Description of changes:
Update run tests related to cgroup v2 resource flag tests for windows.
In wsl2 cgroup v2 is mounted at /sys/fs/cgroup/unified but containerd expects it to be mounted at /sys/fs/cgroup https://github.com/containerd/cgroups/blob/cc78c6c1e32dc5bde018d92999910fdace3cfa27/utils.go#L36.
Enabling cgroup v2 requires extra tweaks in wsl 2 based on https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2
Testing done:
Yes.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.