Skip to content

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

Description

@bketelsen
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions