https://bugzilla.suse.com/show_bug.cgi?id=1228438 https://bugzilla.suse.com/show_bug.cgi?id=1228438#c4 --- Comment #4 from Fabian Vogt <fvogt@suse.com> --- (In reply to Franck Bui from comment #3)
Just providing some updates based on my understanding of the test after Fabian did some investigation (thanks a lot Fabian).
Apparently `wsl /bin/bash -c "systemctl is-systemd-running` creates an environment (container) based on the host environment before executing bash in the container.
More specifically, the hybrid cgroup hierarchy of the host is reused by the container. However since commit f2512de82dc91cfb742a4f4df934bdb4fcad482d, systemd makes systems based on the legacy cgroup harder to boot by incurring a delay of 30 sec to the boot process.
I filed a new report at WSL: https://github.com/microsoft/WSL/issues/11857 Maybe it's possible to somehow work around this downstream by ignoring the inherited cgroup hierarchy and just setting up a v2 one?
This probably explains why the command `wsl /bin/bash -c "systemctl is-systemd-running` is failing to contact PID1 in the container. Sleeping for 30 sec before executing the command should work around the issue.
That said it's not clear to me how this is supposed to work reliably even with v255, ie how `wsl` figures out when it's safe to contact PID1.
I have no idea. That's completely in opaque, proprietary and undocumented code.
PS: Fabian, please correct me if anything I wrote is incorrect.
All correct. -- You are receiving this mail because: You are on the CC list for the bug.