Skip to content
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

systemd doesn't mount / as shared #8922

Closed
1 of 2 tasks
mangkoran opened this issue Sep 29, 2022 · 8 comments
Closed
1 of 2 tasks

systemd doesn't mount / as shared #8922

mangkoran opened this issue Sep 29, 2022 · 8 comments
Assignees

Comments

@mangkoran
Copy link

Version

Windows version: 10.0.22621.521

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.62.1-microsoft-standard-WSL2

Distro Version

ArchWSL

Other Software

WSL version: 0.67.6.0
Kernel version: 5.15.62.1
WSLg version: 1.0.44
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.521

podman 4.2.1-1
systemd 251.4-1
buildah 1.27.2-1

Repro Steps

  1. Install/upgrade WSL 0.67.6
  2. Enable systemd support [1]
  3. Restart your distro; shutdown first wsl --shutdown,
  4. then run it back wsl
  5. Run podman images

Expected Behavior

Podman run without warning and error.

Actual Behavior

Podman print a warning regarding shared mount.

❯ podman images
WARN[0000] "/" is not a shared mount, this could cause issues or missing mounts with rootless containers

Diagnostic Logs

This has been an issue for a while. However, back then there is still no native WSL's systemd support. The introduction of native systemd support made me revisit this issue, and found that it is still persist.

Current workaround is by using WSL's boot command in wsl.conf. [1]

@cerebrate
Copy link

Yep, looking at the current code (the link in the discussion points to an older release), the root filesystem should be automatically remounted as shared by systemd, but it isn't because systemd is running in container mode. See here:

https://cgit.freedesktop.org/systemd/systemd/tree/src/core/mount-setup.c#n383

(Since this is the same root cause as #8840 , it might be worth asking if systemd needs to run in container mode under WSL? To the best of my knowledge, none of the pre-native-support systemd hacks used container mode, and systemd-detect-virt still picked up that it was running under WSL just fine.)

@benhillis benhillis self-assigned this Sep 30, 2022
@cerebrate
Copy link

Well, guess I didn't need to rush that fix into bottle-imp 0.8 after all...

😀

@cerebrate
Copy link

Still present under 0.68.4.

@wizpresso-steve-cy-fan
Copy link

This is a pretty annoying issue, as if you run Kubernetes with root mount propagation (for example Prometheus root exporter), it will not work out of the box. Same goes for Nvidia GPU Operator which some of the driver installer required host path mount to detect existing Nvidia drivers.

@mangkoran
Copy link
Author

mangkoran commented Aug 7, 2023

May I know if there is any update regarding this ticket?

@zbynekwinkler
Copy link

I am on opensuse leap 15.5 and I am also experiencing this issue.

@mangkoran
Copy link
Author

mangkoran commented Nov 28, 2023

Revisited this issue as it still persists in WSL 2.0.9

WSL version: 2.0.9.0
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19044.3693

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants