lxd v4.0.4 installed via snapd on ubuntu 20.04 …
Been trying with images:
- ubuntu:20.04
- ubuntu:18.04
- images:ubuntu/focal/cloud
Network configs are ok … and the correct userdata gets copied to /var/lib/cloud/seed/nocloud-net.
Separating the userdat into a yaml file makes no difference either.
I have run validate-yaml.py on the profile as well as the userdata.yaml, and it says they are OK
Have been through some of the debugging suggestions listed at:
https://cloudinit.readthedocs.io/en/latest/topics/debugging.html
The only error I see in the cloud-init logs in the container is the following:
2021-01-22 22:10:22,958 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloud'>
2021-01-22 22:10:22,958 - __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
2021-01-22 22:10:22,958 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud/user-data (quiet=False)
2021-01-22 22:10:22,958 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud/meta-data (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud/vendor-data (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud/network-config (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud-net/user-data (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Read 18 bytes from /var/lib/cloud/seed/nocloud-net/user-data
2021-01-22 22:10:22,959 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud-net/meta-data (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Read 50 bytes from /var/lib/cloud/seed/nocloud-net/meta-data
2021-01-22 22:10:22,959 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud-net/vendor-data (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Read 18 bytes from /var/lib/cloud/seed/nocloud-net/vendor-data
2021-01-22 22:10:22,959 - util.py[DEBUG]: Reading from /var/lib/cloud/seed/nocloud-net/network-config (quiet=False)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Read 5 bytes from /var/lib/cloud/seed/nocloud-net/network-config
2021-01-22 22:10:22,959 - DataSourceNoCloud.py[DEBUG]: Using seeded data from /var/lib/cloud/seed/nocloud-net
2021-01-22 22:10:22,959 - util.py[DEBUG]: Attempting to load yaml from string of length 50 with allowed root types (<class 'dict'>,)
2021-01-22 22:10:22,959 - util.py[DEBUG]: Attempting to load yaml from string of length 5 with allowed root types (<class 'dict'>,)
2021-01-22 22:10:22,960 - util.py[WARNING]: Failed loading yaml blob. Yaml load allows (<class 'dict'>,) root types, but got str instead
2021-01-22 22:10:22,960 - handlers.py[DEBUG]: finish: init-local/search-NoCloud: FAIL: no local data found from DataSourceNoCloud
2021-01-22 22:10:22,960 - util.py[WARNING]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloud'> failed
2021-01-22 22:10:22,960 - util.py[DEBUG]: Getting data from <class 'cloudinit.sources.DataSourceNoCloud.DataSourceNoCloud'> failed
It’s not obvious which of the config files it’s failing on, but the sequence of error messages suggest it might be the having issues with network-config.
The following are the corresponding entries for network-config:
# in profile (snipped off the user-data)
user.network-config: dhcp
user.networking_mode: dhcp
user.user-data: |
#cloud-config
# in /var/lib/cloud/seed/nocloud-net/network-config
dhcp
I am running macvlan, and the network comes up and obtains dhcp ip address from the external dhcp server … but no section of the user-data gets processed.
I guess the most frustrating thing is not even being sure which config file it’s having issues with, and what the issue is …
Would really appreciate any insights / suggestions I can get … have given this thing the better part of 2 days and still no joy.
Note: I am not new to using cloud-config to provision containers … and while troubleshooting I stripped down the user config to really simple package installs, just to be sure nothing else in there was tripping cloud init.