Skip to content

tools: make frr-reload recognize pbr table range lines as single-line contexts #8867

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

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

wesl-ee
Copy link
Contributor

@wesl-ee wesl-ee commented Jun 17, 2021

One-line fix to make frr-reload.py treat pbr table range ... lines as being single-line contexts instead of creating a new context.

First create a config file with the following contents:

cumulus@cumulus:mgmt:~$ cat frr-1.conf 
nexthop-group GROUP1
 nexthop 21.1.1.2 swp2
pbr-map MAP1 seq 10
 set nexthop-group GROUP1
 match dscp 1
interface swp1
pbr-policy MAP1

Then copy this file and add pbr table range ... to the top:

cumulus@cumulus:mgmt:~$ cat frr-2.conf 
pbr table range 20000 4294966272
!
nexthop-group GROUP1
 nexthop 21.1.1.2 swp2
pbr-map MAP1 seq 10
 match dscp 1
 set nexthop-group GROUP1
interface swp1
 pbr-policy MAP1
./frr-reload.py --test --input frr-1.conf frr-2.conf
[...]
Lines To Delete
===============
no log syslog informational
no nexthop-group GROUP1

Lines To Add
============
pbr table range 20000 4294966272
pbr table range 20000 4294966272
 nexthop-group GROUP1
pbr table range 20000 4294966272
 nexthop 21.1.1.2 swp2

Clearly not a coherent delta. Attempting to apply this delta:

cumulus@cumulus:mgmt:~$ sudo ./frr-reload.py --reload --input frr-1.conf frr-2.conf 
line 7: % Unknown command[4]:  nexthop 21.1.1.2 swp2
line 5: % Unknown command[4]:  nexthop 21.1.1.2 swp2
line 18: % Unknown command[4]:  nexthop 21.1.1.2 swp2

The line `pbr table range ...` does not start a new context so treat it
like a single-line context

Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 17, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/8867 cbfb529
Date 06/16/2021
Start 21:00:46
Finish 21:26:19
Run-Time 25:33
Total 1815
Pass 1815
Fail 0
Valgrind-Errors
Valgrind-Loss
Details vncregress-2021-06-16-21:00:46.txt
Log autoscript-2021-06-16-21:02:01.log.bz2
Memory 485 517 430

For details, please contact louberger

@wesl-ee
Copy link
Contributor Author

wesl-ee commented Jun 21, 2021

ci:rerun

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-19734/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@mjstapp mjstapp merged commit a78dde0 into FRRouting:master Jun 22, 2021
@idryzhov
Copy link
Contributor

@Mergifyio backport stable/8.0

@mergify
Copy link

mergify bot commented Jul 23, 2021

Command backport stable/8.0: success

Backports have been created

mwinter-osr added a commit that referenced this pull request Jul 24, 2021
tools: make frr-reload recognize `pbr table range` lines as single-line contexts (backport #8867)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants