Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ospf: T4739: Adding missing OSPF FRR template #1679

Merged
merged 2 commits into from Nov 27, 2022
Merged

ospf: T4739: Adding missing OSPF FRR template #1679

merged 2 commits into from Nov 27, 2022

Conversation

Cheeze-It
Copy link
Contributor

@Cheeze-It Cheeze-It commented Nov 26, 2022

Adding the parameters that were missing to the OSPF FRR template.

Change Summary

Adding configurations in the OSPF FRR Jinja2 template to fix the parameters that
were not properly being set into FRR when configured in the CLI.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

ospf

Proposed changes

I noticed that when I tried to configure Segment Routing for OSPF that the opaque LSA
capability was not being enabled. I figured out it was because of the OSPF FRR Jinja2
template not properly setting the configurations. Therefore I am fixing the template to
be able to set opaque LSA, and RFC 1583 compatibility.

How to test

Here it is normally.

vyos@vyos:~$ show configuration commands | match ospf
set protocols ospf parameters opaque-lsa
set protocols ospf parameters rfc1583-compatibility

vyos@vyos:~$ vtysh -c "show run"
Building configuration...

Current configuration:
!
frr version 8.3.1
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
ip route 0.0.0.0/0 10.0.0.65
!
router ospf
 auto-cost reference-bandwidth 100
 timers throttle spf 200 1000 10000
exit
!
end

After making changes to the OSPF FRR Jinja2 template:

vyos@vyos# compare
[edit protocols]
+ospf {
+    parameters {
+        opaque-lsa
+        rfc1583-compatibility
+    }
+}
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# exit
Warning: configuration changes have not been saved.
exit

vyos@vyos:~$ vtysh -c "show run"
Building configuration...

Current configuration:
!
frr version 8.3.1
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
ip route 0.0.0.0/0 10.0.0.65
!
router ospf
 compatible rfc1583
 auto-cost reference-bandwidth 100
 timers throttle spf 200 1000 10000
 capability opaque
exit
!
end

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Adding the parameters that were missing to the OSPF FRR template.
@c-po
Copy link
Member

c-po commented Nov 26, 2022

Thank you for the PR - it looks good to me. Can you please add those two parameters to thw smoketest?

@Cheeze-It
Copy link
Contributor Author

Thank you for the PR - it looks good to me. Can you please add those two parameters to thw smoketest?

Sure, absolutely I can. I take it, multiple commits on this PR are ok?

@c-po
Copy link
Member

c-po commented Nov 26, 2022

Of course!

@Cheeze-It
Copy link
Contributor Author

Cheeze-It commented Nov 26, 2022

Good news...

vyos@vyos:~$ /usr/libexec/vyos/tests/smoke/cli/test_protocols_ospf.py
test_ospf_01_defaults (__main__.TestProtocolsOSPF) ... ok
test_ospf_02_simple (__main__.TestProtocolsOSPF) ... ok
test_ospf_03_access_list (__main__.TestProtocolsOSPF) ... ok
test_ospf_04_default_originate (__main__.TestProtocolsOSPF) ... ok
test_ospf_05_options (__main__.TestProtocolsOSPF) ... ok
test_ospf_06_neighbor (__main__.TestProtocolsOSPF) ... ok
test_ospf_07_redistribute (__main__.TestProtocolsOSPF) ... ok
test_ospf_08_virtual_link (__main__.TestProtocolsOSPF) ... ok
test_ospf_09_interface_configuration (__main__.TestProtocolsOSPF) ... ok
test_ospf_10_zebra_route_map (__main__.TestProtocolsOSPF) ... ok
test_ospf_11_interface_area (__main__.TestProtocolsOSPF) ...
Can not use OSPF interface area and area network configuration at the
same time!

ok
test_ospf_12_vrfs (__main__.TestProtocolsOSPF) ... ok
test_ospf_13_export_list (__main__.TestProtocolsOSPF) ... ok
test_ospf_14_segment_routing_configuration (__main__.TestProtocolsOSPF) ... ok

----------------------------------------------------------------------
Ran 14 tests in 38.792s

OK

This is with the new changes added in the smoketest. Which is nice.

@c-po c-po merged commit e4e81b3 into vyos:current Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants