When testing #60 nmstate sometimes raises an unhandled exception:
LC_ALL=C nmstatectl set /tmp/nmstate_linkagg_debug-1535467463-FlJO5z
2018-08-28 10:51:27,053 root DEBUG Checkpoint /org/freedesktop/NetworkManager/Checkpoint/25 created for all devices: 60
2018-08-28 10:51:27,074 root DEBUG Connection adding succeeded: dev=web-bond
2018-08-28 10:51:27,074 root DEBUG NM action queue exhausted, quiting mainloop
2018-08-28 10:51:27,097 root DEBUG Connection adding succeeded: dev=web-bond
2018-08-28 10:51:27,105 root DEBUG Connection adding succeeded: dev=eth1
2018-08-28 10:51:27,137 root ERROR NM main-loop aborted: Connection activation failed: error=nm-manager-error-quark: The device 'web-bond' has no connections available for activation. (2)
2018-08-28 10:51:27,185 root DEBUG Checkpoint /org/freedesktop/NetworkManager/Checkpoint/25 rollback executed: dbus.Dictionary({dbus.String(u'/org/freedesktop/NetworkManager/Devices/1'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/2'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/5'): dbus.UInt32(0L)}, signature=dbus.Signature('su'))
Traceback (most recent call last):
File "/root/.local/bin/nmstatectl", line 10, in <module>
sys.exit(main())
File "/root/.local/lib/python2.7/site-packages/nmstatectl/nmstatectl.py", line 44, in main
return args.func(args)
File "/root/.local/lib/python2.7/site-packages/nmstatectl/nmstatectl.py", line 116, in apply
netapplier.apply(state)
File "/root/.local/lib/python2.7/site-packages/libnmstate/netapplier.py", line 38, in apply
_apply_ifaces_state(desired_state['interfaces'])
File "/root/.local/lib/python2.7/site-packages/libnmstate/netapplier.py", line 52, in _apply_ifaces_state
_edit_interfaces(ifaces_desired_state, ifaces_current_state)
File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
self.gen.next()
File "/root/.local/lib/python2.7/site-packages/libnmstate/netapplier.py", line 74, in _setup_providers
raise ApplyError(mainloop.error)
libnmstate.netapplier.ApplyError: run execution
State:
{
"interfaces": [
{
"link-aggregation": {
"mode": "802.3ad",
"slaves": [
"eth1"
],
"options": {}
},
"state": "up",
"type": "bond",
"name": "web-bond"
}
]
}
Initial state:
nmstatectl show
{
"interfaces": [
{
"ipv4": {
"enabled": false
},
"name": "lo",
"state": "down",
"type": "unknown"
},
{
"ipv4": {
"addresses": [
{
"ip": "192.168.122.193",
"prefix-length": 24
}
],
"enabled": true
},
"name": "eth0",
"state": "up",
"type": "ethernet"
},
{
"ipv4": {
"enabled": false
},
"name": "eth1",
"state": "down",
"type": "ethernet"
},
{
"ipv4": {
"enabled": false
},
"name": "web-bond",
"state": "down",
"type": "bond"
}
]
}
The error sometimes happen when I do this:
nmstatectl set <<EOF
{
"interfaces": [
{
"link-aggregation": {
"mode": "802.3ad",
"slaves": [
"eth1"
],
"options": {}
},
"state": "up",
"type": "bond",
"name": "web-bond"
}
]
}
EOF
If the error does not happen, run nmcli con delete eth1 web-bond and try again. Or try again without removing the interfaces to try to trigger the error in #62.
When testing #60 nmstate sometimes raises an unhandled exception:
State:
Initial state:
The error sometimes happen when I do this:
If the error does not happen, run
nmcli con delete eth1 web-bondand try again. Or try again without removing the interfaces to try to trigger the error in #62.