Skip to content

Commit

Permalink
wsl/enable_systemd.pm: Set cgroup_no_v1=all for the WSL2 host VM
Browse files Browse the repository at this point in the history
This is needed to not use legacy cgroupv1.

Not adding a softfail because this is something that needs to be addressed
in WSL, not Tumbleweed.
  • Loading branch information
Vogtinator committed Jul 31, 2024
1 parent d6c1848 commit 588b79c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/wsl/enable_systemd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Mojo::Base qw(windowsbasetest);
use testapi;
use utils qw(zypper_call enter_cmd_slow);
use version_utils qw(is_opensuse);
use version_utils qw(is_opensuse is_tumbleweed);
use wsl qw(is_fake_scc_url_needed);

sub run {
Expand Down Expand Up @@ -42,6 +42,8 @@ sub run {
enter_cmd("exit");
}
);
# Hopefully temporary workaround for https://github.com/microsoft/WSL/issues/11857
$self->run_in_powershell(cmd => q(echo "[wsl2]`nkernelCommandLine = cgroup_no_v1=all" >> ~/.wslconfig)) if is_tumbleweed;
$self->run_in_powershell(cmd => q(wsl --shutdown));
$self->run_in_powershell(
cmd => '$port.WriteLine($(wsl /bin/bash -c "systemctl is-system-running"))',
Expand Down

0 comments on commit 588b79c

Please sign in to comment.