cloud-init error in opensuse
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When running cloud-init (version 21.4-150100.8.58.1) in an openSUSE 15.3 VM using NoCloud as datasource with the following configuration:
I am setting the meta-data file and user-data file in /var/lib/
meta-data file:
instance-id: intance-id
local-hostname: localhostname
hostname: hostname
dsmode: local
user-data file:
#cloud-config
write_files:
- content: |
"Does cloud-init work?"
owner: root:root
permissions: '0644'
path: /srv/foo
- content: |
"IT SURE DOES!"
owner: root:root
permissions: '0644'
path: /srv/bar
And the datasource information in /etc/cloud/
10_datasource.cfg file:
datasource_list: [ NoCloud, None ]
I am enabling the cloud-init services, rebooting the system and getting the following error:
Traceback (most recent call last):
File "/usr/lib/
ret = functor(name, args)
File "/usr/lib/
init.
File "/usr/lib/
netcfg, bring_up=bring_up)
File "/usr/lib/
self.
File "/usr/lib/
return super()
File "/usr/lib/
renderer.
File "/usr/lib/
templates=
File "/usr/lib/
iface_cfg = NetInterface(
File "/usr/lib/
ipv4_
AttributeError: 'NoneType' object has no attribute 'get'
Not sure why it's using debian.py instead of opensuse.py.
It looks like you have no /etc/cloud/ cloud.cfg . If I launch a standard openSUSE 15.3 cloud image (using 'lxc launch images: opensuse/ 15.3/cloud' ), I have this in /etc/cloud/ cloud.cfg: /paste. ubuntu. com/p/CQn29SBTM j/
https:/
If I remove that file, I get the same traceback that you're seeing, so I think that should solve your issue. Given this, I'm going to set this bug as Invalid. If there's still a problem here that needs to be addressed, please do set it back to New.