These modules were modified for compatibility with 1.3+, but did nto have integration test changes made. Some tests succeed in 1.3, but there will need to be adjustments for the multi-pronged tests, similar to what we did with BGP when using get_version in order to handle the parameter differences and config schema differences
Description
Details
- Version
- 6.0.0
- Is it a breaking change?
- Unspecified (possibly destroys the router)
- Issue type
- Bug (incorrect behavior)
Revisions and Commits
Event Timeline
found the bug in ospf_interfaces bug. This code (both for 1.3- and 1.4+) does not cut it:
def get_config_set_1_4(self, data):
"""To classify the configurations beased on interface"""
interface_list = []
config_set = []
int_string = ""
for config_line in data.splitlines():
ospf_int = re.search(r"set protocols (?:ospf|ospfv3) interface (\S+) .*", config_line)
if ospf_int:
if ospf_int.group(1) not in interface_list:
if int_string:
config_set.append(int_string)
interface_list.append(ospf_int.group(1))
int_string = ""
int_string = int_string + config_line + "\n"
if int_string:
config_set.append(int_string)
return config_setWe are lucky for 1.3- as the conf set from a device comes pretty ordered:
set interfaces bonding bond2 ip ospf transmit-delay '45'
set interfaces bonding bond2 ipv6 ospfv3 passive
set interfaces ethernet eth0 address '192.168.122.84/24'
set interfaces ethernet eth0 ip ospf cost '50'
set interfaces ethernet eth0 ip ospf priority '26'
set interfaces ethernet eth0 ipv6 ospfv3 instance-id '33'
set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore
and the config_set gets pretty solid:
"set interfaces bonding bond2 ip ospf transmit-delay '45'\nset interfaces bonding bond2 ipv6 ospfv3 passive\n", "set interfaces ethernet eth0 address '192.168.122.84/24'\nset interfaces ethernet eth0 hw-id '52:54:00:cd:4f:e5'\nset interfaces ethernet eth0 ip ospf cost '50'\nset interfaces ethernet eth0 ip ospf priority '26'\nset interfaces ethernet eth0 ipv6 ospfv3 instance-id '33'\nset interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore\n",
unlike 1.4+ (unordered and concatenation breaks):
set protocols ospf interface bond2 transmit-delay '45'
set protocols ospf interface eth0 cost '50'
set protocols ospf interface eth0 priority '26'
set protocols ospfv3 interface bond2 passive
set protocols ospfv3 interface eth0 instance-id '33'
set protocols ospfv3 interface eth0 mtu-ignore
"set protocols ospf interface bond2 transmit-delay '45'\n", "set protocols ospf interface eth0 cost '50'\nset protocols ospf interface eth0 priority '26'\nset protocols ospfv3 interface bond2 passive\nset protocols ospfv3 interface eth0 instance-id '33'\nset protocols ospfv3 interface eth0 mtu-ignore\n"
This results in bond2 ospfv3 parameter ('passive') appear in eth0
https://github.com/vyos/vyos.vyos/pull/395 for OSPFv2 fixes - both unit and integration