-
Notifications
You must be signed in to change notification settings - Fork 841
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
cloud-init aborted by WSL 'watchdog' #11602
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
The relevant log excerpts have already been included. Happy to provide additional information if necessary. Maybe it's worth mentioning that setting |
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The scipt will output the path of the log file once done. Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
Diagnostic information
|
Thank you @thielj. Based on the symptoms, I wonder if the issue is that the ubuntu distribution installer simply shuts down the WSL distribution after creating the user. Do you see the same symptoms with let's say debian ? |
@OneBlue Hi. Please note that the shutdown is initiated by the '10000ms watchdog' before user credentials are entered (21:46:49). It's not automatically restarting after this. Only when you provide the default user name and hit enter the instance/distro is brought up again (21:47:00). Just wait long enough (e.g. 30 seconds) when prompted to enter the default username and you will see. The default user is created after this, and the instance/distro is then shutdown a second time before the default user is logged in. I naturally tried Debian but it comes without cloud-init. I haven't investigated how to roll my own cloud-init enabled WSL distro but would think that with the observed '10000ms watchdog' this would be a waste of time. Even the standard 'apt upgrade' module wouldn't be safe to run. |
@OneBlue Maybe this helps to determine if cloud-init is still running? https://cloudinit.readthedocs.io/en/latest/howto/status.html |
@thielj: I wonder if what you're experiencing is the normal VM idle time out if there's no activity. Let's try something: Can you put:
in |
I tried that already, and it's not. Sorry, I thought I had mentioned it.
…On Tue, May 28, 2024, 19:48 Blue ***@***.***> wrote:
@thielj <https://github.com/thielj>: I wonder if what you're experiencing
is the normal VM idle time out if there's no activity. Let's try something:
Can you put:
[wsl2]
vmIdleTimeout=-1
in .wslconfig and see if that the solves the issue for you ?
—
Reply to this email directly, view it on GitHub
<#11602 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA6CUVLJLACGS4TSUIZ7OSLZETGQ3AVCNFSM6AAAAABIAMLEYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZVHEYDEMJTGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ok interesting. Could you capture logs with that .wslconfig value set ? /logs |
@OneBlue It was mentioned here: #11602 (comment) Neither -1 or a much longer timeout made any difference at all. Neither did anything else that looked even remotely related in And it seems I just discovered a workaround: If I log into the distro from another terminal window, during the installation, as soon as this is possible, Maybe the following is related. The actual shutdown in my case also happens almost exactly 15s after
Have you looked what is triggering your If it's supposed to detect a running cloud-init: maybe it would be worth looking into that bit? And if not, my guess is that a service like cloud-init doesn't count as 'running process other than init'. A simple |
@OneBlue And another update regarding that workaround: Looking at the debug console for cloud-init output or counting to 15 and then starting I can workaround this by replacing the symlink with an immutable copy of
Your
I tried |
Windows Version
Microsoft Windows [Version 10.0.22631.3593]
WSL Version
2.2.4.0 (also tested with v2.1.5 and v2.0.5)
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-microsoft-standard-WSL2
Distro Version
Ubuntu 24.04
Other Software
I uninstalled anything that could possibly interfer
Repro Steps
I made sure
.wslconfig
doesn't exist.Create a minimalist
.cloud-init/default.user-data
as follows:Run
wsl --install Ubuntu-24.04
. When prompted for the username, pause for about 30 seconds. Then continue as usual.Expected Behavior
I would expect that cloud-init would be able to complete an operation that takes longer than just a few seconds (e.g. installing a larger number of packages, which is how I noticed this first).
Actual Behavior
Some kind of watchdog kicks in 10s after the machine is started, logs in as root and executes a shutdown about 15s later, without letting cloud-init finish and leaving the system in an undefined state.
Diagnostic Logs
When logged in, run
journalctl
. You'll find entries like the following (some lines ~~~ omitted):The last two lines above are the last logged message and the first message once the machine is started again.
The shutdown (21:46:49) was most likely initiated by whatever the watchdog's root login was doing.
The start (21:48:00) was initiated interactively by entering the default user credentials.
The text was updated successfully, but these errors were encountered: