Deleting bridge before gre-bridge tunnel causes problems


#1

Add a bridge:

admin@route-extern# set interfaces bridge br1 description "Test Bridge"
[edit]
admin@route-extern# commit

Create a tunnel

set interfaces tunnel tun0 address '172.24.242.2/30'
set interfaces tunnel tun0 encapsulation 'gre-bridge'
set interfaces tunnel tun0 firewall local name 'WAN-LOCAL'
set interfaces tunnel tun0 local-ip '10.44.44.44'
set interfaces tunnel tun0 multicast 'disable'
set interfaces tunnel tun0 remote-ip '44.44.44.44'
set interfaces tunnel tun0 parameters ip bridge-group bridge br1
admin@route-extern# commit
[edit]

Delete the Bridge

admin@route-extern# delete interfaces bridge br1
[edit]
admin@route-extern# commit

Basically try and do anything with the tunnel. Deleting is a good way to trigger it.

admin@route-extern# delete interfaces tunnel tun0
[edit]
admin@route-extern# commit
[ interfaces tunnel tun0 parameters ip bridge-group bridge br1 ]
bridge br1 does not exist!

delete [ interfaces tunnel tun0 ] failed
Commit failed
[edit]

Try to re-add the bridge

admin@route-extern# set interfaces bridge br1 description "Test"
[edit]
admin@route-extern# commit

And try to commit

[ interfaces tunnel tun0 parameters ip bridge-group bridge br1 ]
device tun0 is not a slave of br1

But it doesn’t exist anymore

admin@route-extern# delete interfaces tunnel tun0 parameters ip bridge-group bridge br1

  Nothing to delete (the specified value does not exist)

End result is you can’t commit. I had to hand edit the config.boot and reboot.


#3

The real issue is that the safeguard against deleting a bridge that still has member interfaces is not working. I’m looking into it.

Here’s the task where you can track the progress: https://phabricator.vyos.net/T898


#4

Ok, you have actually uncovered two bugs in one move!
The first bug is that deleting a bridge that still has active members should not have been allowed to begin with.

But there is another bug that prevents you from deleting a bridge and removing a tunnel from it at the same time with the same symptoms. https://phabricator.vyos.net/T900

It actually get worse and there are two more bugs there: tunnels cannot be moved from one bridge to another, and STP cost and priority options are non-functional, but that’s for later.


#5

Fixes for both will be included in the rc3 (planned for Monday). Thanks for finding it!


#6

Thanks for the fixes. Glad it was simple to sort out