KeyError on optional parameters on bridge
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I use NoCloud with network-
and the following network config according to
https:/
/var/lib/
version: 2
ethernets:
eth0:
match: {name: "eth0"}
eth1:
match: {name: "eth1"}
bridges:
br0:
interfaces: [eth1]
cloud-init init fails with a Python error:
2020-05-20 09:53:24,474 - util.py[WARNING]: failed stage init
failed run of stage init
-------
Traceback (most recent call last):
File "/usr/lib/
ret = functor(name, args)
File "/usr/lib/
init.
File "/usr/lib/
return self.distro.
File "/usr/lib/
dev_names = self._write_
File "/usr/lib/
return self._supported
File "/usr/lib/
renderer.
File "/usr/lib/
network_
File "/usr/lib/
nsi.
File "/usr/lib/
self.
File "/usr/lib/
handler(self, command)
File "/usr/lib/
self.
File "/usr/lib/
params = item_params[
KeyError: 'parameters'
It may be fixed by changing:
https:/
to
params = item_params.
as the parameters key is optional.
The workaround is to add an empty
parameters: {}
mapping to your bridge
Related branches
- cloud-init Commiters: Pending requested
-
Diff: 13 lines (+1/-1)1 file modifiedcloudinit/net/network_state.py (+1/-1)
Hello Felix and thanks for your bug report. Could you please run:
cloud-init collect-logs
right after the problem occurs, and attach the generated tarball to this bug report? The context information in those logs will help us to better understand what's going on.
I'm setting the status of this report to Incomplete for the moment, please change it back to New after commenting back. Thanks!