Page MenuHomeVyOS Platform

[1.3.6->1.4.0-epa1 Migration] "ospf passive-interface default" incorrectly added
Closed, ResolvedPublicBUG

Description

Starting with 1.3.6:-

vyos@lab-vyos-r1:~$ sh conf c
set interfaces ethernet eth0 hw-id '00:16:3e:ae:73:48'
set interfaces ethernet eth0 vif 20 address '193.201.42.173/28'
set interfaces ethernet eth0 vif 20 ip ospf cost '999'
set interfaces ethernet eth0 vif 20 ip ospf dead-interval '4'
set interfaces ethernet eth0 vif 20 ip ospf hello-interval '1'
set interfaces ethernet eth0 vif 20 ip ospf priority '255'
set interfaces ethernet eth0 vif 20 ip ospf retransmit-interval '5'
set interfaces ethernet eth0 vif 20 ip ospf transmit-delay '1'
set interfaces ethernet eth0 vif 666 address '10.66.66.1/24'
set interfaces loopback lo
set protocols ospf area 0 area-type normal
set protocols ospf area 0 network '193.201.42.160/28'
set protocols ospf area 0 network '10.66.66.0/24'
set protocols ospf log-adjacency-changes detail
set protocols ospf passive-interface 'eth0.666'
set protocols static route 0.0.0.0/0 next-hop 193.201.42.170 distance '130'
set service snmp community testsnmp authorization 'ro'
set service snmp community testsnmp network '193.201.42.0/24'
set service ssh
set system config-management commit-revisions '100'
set system console device ttyS0 speed '115200'
set system host-name 'lab-vyos-r1'
set system login banner post-login ''
set system login banner pre-login ''
set system login user vyos authentication encrypted-password 'xxx'
set system login user vyos authentication plaintext-password ''
set system syslog global facility all level 'info'
set system syslog global facility protocols level 'debug'

which is happily exchanging OSPF on eth0.20.

After upgrading to 1.4.0-epa1, the config becomes:-

vyos@lab-vyos-r1:~$ sh conf c
set interfaces ethernet eth0 hw-id '00:16:3e:ae:73:48'
set interfaces ethernet eth0 vif 20 address '193.201.42.173/28'
set interfaces ethernet eth0 vif 666 address '10.66.66.1/24'
set interfaces loopback lo
set protocols ospf area 0 area-type normal
set protocols ospf area 0 network '193.201.42.160/28'
set protocols ospf area 0 network '10.66.66.0/24'
set protocols ospf interface eth0.20 cost '999'
set protocols ospf interface eth0.20 dead-interval '4'
set protocols ospf interface eth0.20 hello-interval '1'
set protocols ospf interface eth0.20 priority '255'
set protocols ospf interface eth0.20 retransmit-interval '5'
set protocols ospf interface eth0.20 transmit-delay '1'
set protocols ospf interface eth0.666 passive
set protocols ospf log-adjacency-changes detail
set protocols ospf passive-interface 'default'
set protocols static route 0.0.0.0/0 next-hop 193.201.42.170 distance '130'
set service snmp community testsnmp authorization 'ro'
set service snmp community testsnmp network '193.201.42.0/24'
set service ssh
set system config-management commit-revisions '100'
set system console device ttyS0 speed '115200'
set system host-name 'lab-vyos-r1'
set system login banner post-login ''
set system login banner pre-login ''
set system login user vyos authentication encrypted-password 'xxx'
set system login user vyos authentication plaintext-password ''
set system syslog global facility all level 'info'
set system syslog global facility local7 level 'debug'

which no longer exchanges OSPF on eth0.20 because the migration has incorrectly added:-

set protocols ospf passive-interface 'default'

The fix is (of course) very simple once the issue is identified, namely removing the erroneous setting.

Details

Difficulty level
Easy (less than an hour)
Version
1.4.0-epa1
Why the issue appeared?
Design mistake
Is it a breaking change?
Config syntax change (migratable)
Issue type
Bug (incorrect behavior)

Event Timeline

Just to observe that this is not added on every occasion - see for example my update today in https://vyos.dev/T6076 where it was not added when the migration succeeded.

Pretty sure this is the offending migrator. I briefly discussed this with @c-po

https://github.com/vyos/vyos-1x/blob/current/src/migration-scripts/ospf/0-to-1#L28

Suspect it's meant to be used as condition for line 34:

if default:
    config.set(ospf_base + ['passive-interface'], value='default')
c-po changed the task status from Open to In progress.Thu, Apr 4, 7:02 PM
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Config syntax change (migratable).
c-po moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta (1.4.0-epa3) board.