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

[WSL datasource] Error when .cloud-init directory is empty #5632

Closed
jibel opened this issue Aug 22, 2024 · 1 comment
Closed

[WSL datasource] Error when .cloud-init directory is empty #5632

jibel opened this issue Aug 22, 2024 · 1 comment
Labels
bug Something isn't working correctly

Comments

@jibel
Copy link

jibel commented Aug 22, 2024

Bug report

This is specific to the WSL datasource.

When the .cloud-init directory exists on the Windows host but is empty or contains configuration files that do no apply to any WSL instance, the following error message is displayed:

> ubuntu2404.exe
Installing, this may take a few minutes...
Checking for initialization tasks...


status: done
WARNING: initialization tasks partially succeeded, see below:
status: done
extended_status: degraded done
boot_status_code: enabled-by-generator
last_update: Thu, 01 Jan 1970 05:13:58 +0000
detail: DataSourceWSL
errors: []
recoverable_errors:
ERROR:
        - Unable to load any user-data file in /mnt/c/Users/jean-/.cloud-init: /mnt/c/Users/jean-/.cloud-init directory is empty
        - Unable to load any user-data file in /mnt/c/Users/jean-/.cloud-init: /mnt/c/Users/jean-/.cloud-init directory is empty
        - Unable to load any user-data file in /mnt/c/Users/jean-/.cloud-init: /mnt/c/Users/jean-/.cloud-init directory is empty
        - Unable to load any user-data file in /mnt/c/Users/jean-/.cloud-init: /mnt/c/Users/jean-/.cloud-init directory is empty
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: u
New password:
Retype new password:
passwd: password updated successfully
Installation successful!

The expectation is that this situation should not be considered as an error.

Steps to reproduce the problem

  1. On a Windows machine with WSL, create a directoy %USERPROFILE%/.cloud-init/ and keep it empty
mkdir "$env:USERPROFILE\.cloud-init"
  1. Install Ubuntu 24.04 LTS in WSL:
ubuntu2404.exe
  1. Proceed with the installation

Environment details

  • Cloud-init version: 99.daily-202408162034-56aa70636~ubuntu24.04.1
  • Operating System Distribution: Ubuntu 24.04 LTS
  • Cloud provider, platform or installer type: WSL
WSL version: 2.3.14.0
Kernel version: 6.6.36.3-1
WSLg version: 1.0.64
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22631.4037

cloud-init logs

cloud-init.logs.tar.gz

@jibel jibel added bug Something isn't working correctly new An issue that still needs triage labels Aug 22, 2024
aciba90 added a commit to aciba90/cloud-init that referenced this issue Aug 22, 2024
aciba90 added a commit to aciba90/cloud-init that referenced this issue Aug 23, 2024
Do not treat the emptiness of .cloud-init/ as an error in the logs
if agent.yaml is present.

Fixes canonicalGH-5632
aciba90 added a commit to aciba90/cloud-init that referenced this issue Aug 23, 2024
Do not treat the emptiness of .cloud-init/ as an error in the logs
if agent.yaml is present.

Fixes canonicalGH-5632
@TheRealFalcon TheRealFalcon removed the new An issue that still needs triage label Aug 26, 2024
@aciba90
Copy link
Contributor

aciba90 commented Aug 27, 2024

Tracking in SC-1862.

aciba90 added a commit to aciba90/cloud-init that referenced this issue Aug 27, 2024
aciba90 added a commit to aciba90/cloud-init that referenced this issue Aug 27, 2024
Do not treat the emptiness of .cloud-init/ as an error in the logs
if agent.yaml is present.

Fixes canonicalGH-5632
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

3 participants