An error occurred: 'str' object has no attribute 'get'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
# WHAT
**netplan try** crashes while processing yaml file. The same yaml was successfully tested (no errors) at Ubuntu 19.10.
# HOW TO REPRODUCE
```
user@pc:/# cat /etc/netplan/
# MANAGED BY ANSIBLE
network:
version: 2
ethernets:
renderer: networkd
eno2:
optional: true
addresses:
- 192.168.5.15/24
vlans:
renderer: networkd
vlan4:
id: 4
link: eno2
optional: true
addresses:
- 192.168.4.15/24
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
wifis:
renderer: NetworkManager
root@pc:/# netplan try
An error occurred: 'str' object has no attribute 'get'
Reverting.
Traceback (most recent call last):
File "/usr/share/
NetplanAppl
File "/usr/share/
NetplanAppl
File "/usr/share/
apply_
File "/usr/share/
if (is_ovs_
File "/usr/share/
if interfaces[
AttributeError: 'str' object has no attribute 'get'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/sbin/
netplan.main()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
self.revert()
File "/usr/share/
NetplanAppl
File "/usr/share/
NetplanAppl
File "/usr/share/
apply_
File "/usr/share/
if (is_ovs_
File "/usr/share/
if interfaces[
AttributeError: 'str' object has no attribute 'get'
root@pc:/#
```
# SYSTEM INFO
```
Ubuntu 20.10
Linux kupc 5.8.0-29-generic #31-Ubuntu SMP Fri Nov 6 12:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
libnetplan0/
netplan.
```
Related branches
- Łukasz Zemczak: Approve
-
Diff: 4519 lines (+2723/-308)52 files modified.github/pull_request_template.md (+1/-0)
.github/workflows/build.yml (+33/-0)
.github/workflows/check-coverage.yml (+41/-0)
Makefile (+5/-6)
README.md (+2/-3)
dbus/io.netplan.Netplan.conf (+2/-0)
debian/changelog (+19/-0)
debian/libnetplan0.symbols (+2/-0)
dev/null (+0/-4)
doc/manpage-footer.md (+1/-1)
doc/netplan-dbus.md (+42/-0)
doc/netplan-generate.md (+5/-0)
doc/netplan-get.md (+39/-0)
doc/netplan-set.md (+42/-0)
doc/netplan-try.md (+3/-0)
doc/netplan.md (+48/-35)
examples/dbus_config_scenario.txt (+41/-0)
examples/openvswitch.yaml (+45/-0)
examples/wireguard.yaml (+27/-0)
netplan/cli/commands/__init__.py (+4/-0)
netplan/cli/commands/apply.py (+40/-49)
netplan/cli/commands/get.py (+67/-0)
netplan/cli/commands/info.py (+1/-1)
netplan/cli/commands/set.py (+123/-0)
netplan/cli/commands/try_command.py (+7/-3)
netplan/cli/ovs.py (+6/-2)
netplan/cli/utils.py (+52/-6)
netplan/configmanager.py (+56/-2)
netplan/terminal.py (+15/-10)
src/dbus.c (+662/-50)
src/generate.c (+58/-29)
src/networkd.c (+13/-12)
src/nm.c (+5/-2)
src/openvswitch.c (+2/-2)
src/parse.c (+18/-1)
src/parse.h (+3/-0)
src/util.c (+21/-3)
src/util.h (+3/-0)
tests/dbus/test_dbus.py (+556/-15)
tests/generator/base.py (+10/-7)
tests/generator/test_errors.py (+15/-0)
tests/generator/test_routing.py (+58/-0)
tests/generator/test_vlans.py (+47/-56)
tests/integration/base.py (+2/-1)
tests/integration/ethernets.py (+76/-0)
tests/integration/ovs.py (+1/-4)
tests/integration/routing.py (+17/-0)
tests/integration/tunnels.py (+1/-1)
tests/test_cli_get_set.py (+322/-0)
tests/test_configmanager.py (+29/-3)
tests/test_ovs.py (+10/-0)
tests/test_utils.py (+25/-0)
- Łukasz Zemczak: Approve
-
Diff: 4041 lines (+2702/-304)49 files modified.github/pull_request_template.md (+1/-0)
.github/workflows/build.yml (+33/-0)
.github/workflows/check-coverage.yml (+41/-0)
Makefile (+5/-6)
README.md (+2/-3)
dbus/io.netplan.Netplan.conf (+2/-0)
doc/manpage-footer.md (+1/-1)
doc/netplan-dbus.md (+42/-0)
doc/netplan-generate.md (+5/-0)
doc/netplan-get.md (+39/-0)
doc/netplan-set.md (+42/-0)
doc/netplan-try.md (+3/-0)
doc/netplan.md (+48/-35)
examples/dbus_config_scenario.txt (+41/-0)
examples/openvswitch.yaml (+45/-0)
examples/wireguard.yaml (+27/-0)
netplan/cli/commands/__init__.py (+4/-0)
netplan/cli/commands/apply.py (+40/-49)
netplan/cli/commands/get.py (+67/-0)
netplan/cli/commands/info.py (+1/-1)
netplan/cli/commands/set.py (+123/-0)
netplan/cli/commands/try_command.py (+7/-3)
netplan/cli/ovs.py (+6/-2)
netplan/cli/utils.py (+52/-6)
netplan/configmanager.py (+56/-2)
netplan/terminal.py (+15/-10)
src/dbus.c (+662/-50)
src/generate.c (+58/-29)
src/networkd.c (+13/-12)
src/nm.c (+5/-2)
src/openvswitch.c (+2/-2)
src/parse.c (+18/-1)
src/parse.h (+3/-0)
src/util.c (+21/-3)
src/util.h (+3/-0)
tests/dbus/test_dbus.py (+556/-15)
tests/generator/base.py (+10/-7)
tests/generator/test_errors.py (+15/-0)
tests/generator/test_routing.py (+58/-0)
tests/generator/test_vlans.py (+47/-56)
tests/integration/base.py (+2/-1)
tests/integration/ethernets.py (+76/-0)
tests/integration/ovs.py (+1/-4)
tests/integration/routing.py (+17/-0)
tests/integration/tunnels.py (+1/-1)
tests/test_cli_get_set.py (+322/-0)
tests/test_configmanager.py (+29/-3)
tests/test_ovs.py (+10/-0)
tests/test_utils.py (+25/-0)
Changed in netplan: | |
status: | New → Confirmed |
Changed in netplan: | |
status: | Confirmed → Fix Committed |
Changed in netplan: | |
status: | Fix Committed → Fix Released |
Bellow is a minimal reproducible config.
``` 01-network- manager- all.yaml
root@pc:/# cat /etc/netplan/
network:
version: 2
wifis:
renderer: NetworkManager
```