Closed WindsOfHades closed 3 years ago
Hi @WindsOfHades
Are you by any chance using the Ubuntu subsystem?
If so, the issue here is owing to this not having systemd. Itβs a stripped down version of Ubuntu. The containers, all leverage systemd and when they try to use the parents subsystem, this is missing. We can work around this by just creating the required components that are needed.
Could you run the following, before doing the docker-compose up
sudo mkdir -p /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
Then try starting the lab. Please let me know how you get on π
Thanks for the quick reply. It works now on WSL2 (Ubuntu) with the suggested mount command.
P.s. In case you have time, It would be great if you can explain how a lack of systemd in WSL simply resolved by a mount to an empty folder.
Hi @WindsOfHades
I'll be fully transparent on this, I do not know the specifics at a low level in why the systemd container kicks into life with this directory.
Like most of our journeys and troubles, the answer fortunately for this one was found on Google for another systemd container that was having the same problem.
Systemd in a container is kind of a necessary evil here with the course, but is super beneficial. When building the lab I tried different variations without it, and some alternatives that emulate systemd functionality. Nothing though really came close to the systemd experience, especially where you want Ansible to interact with Linux services natively as you'd expect.
The pros to it of course are us being able to have these images, that look 99% like a full OS in the convenience of a container. The negative though, are aspects like these and other bits of compatibility that sometimes arise on other Linux systems (for example, ones that use cgroups v2.
Fortunately (touchwood), so far for all issues that have been raised, there has been a resolution π
Wish I could give you more specifics. Really hope you enjoy the course!
I did not manage to set the portal up on WSL2. It worked on my windows machine though. Do you happen to know what is the issue?