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

[wsl2] values from /etc/sysctl.conf not applied on container start #4232

Open
bketelsen opened this issue Jun 25, 2019 · 1 comment

Comments

@bketelsen
Copy link

commented Jun 25, 2019

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.18922.1000]

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

Trying to increase max_user_watches according to vs-code instructions.
Edit /etc/sysctl.conf, then apply values with sudo sysctl -p
Reboot, reopen vs-code, get same error.
cat /proc/sys/fs/inotify/max_user_watches --> 8192, not the 524288 value listed in sysctl.conf
actually apply the sysctl values manually: sudo sysctl -p
cat /proc/sys/fs/inotify/max_user_watches --> 524288

  • What's wrong / what should be happening instead:
    some process in /init should be applying sysctl values from /etc/sysctl.conf, but that isn't happening.

  • workaround:
    add sudo sysctl -p to .bashrc or similar. Not ideal, not guaranteed to be triggered unless a bash process is started.

@therealkenc

This comment has been minimized.

Copy link
Collaborator

commented Jun 25, 2019

This is variation everything systemd. Nothing is reading /etc/sysctl.conf. [Nothing is reading /etc/environment ref #1405 either.]

I believe SOP for now would be to stick it in .bashrc with sudors tricks (make a script and give the script full reign). Or go ballz #994. Or alt approach hypothetical open-ended #2530 flips status.

I am tentatively (really super tentatively) looking at posting something to get us by, for a while, on these. No promises. Not really fair to dupe #994 #2530 either. So, yeah.

[ed: Pulled suggestion maybe WSL2 should just have a bigger default in the kernel. Doesn't seem as great/simple an idea on the second day.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.