summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-04-21tools: Cleanup frr-reload.py by running black on itDonald Sharp
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-21tools: Fix warning when running frr-reload.pyDonald Sharp
When I run frr-reload.py I am seeing this error: Apr 21 06:23:51 eva frrinit.sh[3776992]: /usr/lib/frr/frr-reload.py:1094: SyntaxWarning: "is not" with a literal. Did you mean "!="? Apr 21 06:23:51 eva frrinit.sh[3776992]: if line is not "exit-vrf": fix Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-09tools: add note to users re: frr.conf overwriteQuentin Young
Most software doesn't overwrite its own config files; vtysh's 'wr mem' may be confusing, so add a note to the config file explaining changes made may be overwritten. Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-06Merge pull request #8384 from volta-networks/fix_no_srb_blockQuentin Young
tools: do in-place SRGB/SRLB changes
2021-04-04Merge pull request #8364 from stipmonster/masterQuentin Young
Added pathd to the init files
2021-04-01tools: do in-place SRGB/SRLB changesEmanuele Di Pascale
avoid issuing a [no] command if we are then issuing the affirmative one. This avoids spurious requests for the default label ranges, which might fail if something else is using those labels. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-03-31tools: frr-reload fixes for deleting vrf static routesDon Slice
Problems reported that in certain cases, frr-reload.py would delete vrf static routes inadvertantly due to two different reasons. First, vrf statics with null0 or Null0 nexthops would fail the match since rendered as blackholes. This was already fixed for non-vrf statics so added for vrf-based. Second, frr-reload would fail to match due to different formats for adding the command. If entered in the old way "ip route x.x.x.x/x y.y.y.y vrf NAME" and rendered in the new sway "vrf NAME\nip route x.x.x.x/x y.y.y.y" it would fail to match do an inadvertant delete. Ticket: 2570270 Signed-off-by: Don Slice <dslice@nvidia.com>
2021-03-31tools: frr-reload.py changes to make black happyDon Slice
Since black is finding issues before applying my change, committing those changes separately Signed-off-by: Don Slice <dslice@nvidia.com>
2021-03-29tools: Added pathd to the relevant init filesErik Kooistra
Currently pathd is missing from the deamon list in frrcommon with this missing frrinit can't start pathd if it is added to the deamon file. This commit adds it to the frrcommon deamon list and updates the example deamon file. Signed-off-by: Erik Kooistra <me@erikkooistra.nl>
2021-03-26tools/gcc-plugin: support [un]signed in pragmaDavid Lamparter
Need `unsigned char *` for `%pHX`. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-26tools/gcc-plugin: fix format precision/width typeDavid Lamparter
`%*.*pEXT` applied the extension type to the precision and width (*.*) too. Oops. Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-25Merge pull request #8341 from simondeziel/systemd-onfailureDonald Sharp
systemd's %n already includes the type suffix (.service)
2021-03-25Merge pull request #8252 from SaiGomathiN/8249Donald Sharp
pimd: support bundle commands added
2021-03-25tools: fix systemd OnFailure directiveSimon Deziel
systemd's %n already includes the type suffix (.service) Signed-off-by: Simon Deziel <simon@sdeziel.info>
2021-03-22tools: run `vtysh -b` once for all-startupDavid Lamparter
As noted by Donald: When FRR is starting all daemons (or restarting them all) FRR is reading in the configuration 1 time for each daemon specified to run. This is not a big deal if you have a very small configuration. But with large configurations FRR is taking long enough that watchfrr is not establishing connection to all the daemons and starting some over. Modify the code so that vtysh is only read in at the end of a all sequence. If we are restarting an individual daemon allow the read in of the whole config. Reported-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: David Lamparter <equinox@diac24.net>
2021-03-17tools: Add pimd support bundle commandsnsaigomathi
PIM Support Bundle commands are added in support_bundle_commands.conf file. It will help us in debugging PIM test Failures. Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2021-03-16Merge pull request #8155 from idryzhov/zebra-support-bundleDonald Sharp
zebra support bundle fixes and improvements
2021-03-16Merge pull request #8214 from chiragshah6/mdevDonatas Abraitis
tools: frr-reload refine error handling
2021-03-10tools: add explicit licence phraseJafar Al-Gharaibeh
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2021-03-10tools: example bash script client for the nhrpd event sockJoe Maimon
Signed-off-by: Joe Maimon <jmaimon@jmaimon.com>
2021-03-08tools: frr-reload capture vtysh msg upon failureChirag Shah
Log vtysh message for a failed command. Ticket:2556706 Reviewed By: Testing Done: frr reload fails to delete default bgp instance in presence of bgp vrf instance(s), it captures vtysh message and logs in frr-reload.log logs backend 2021-03-05 05:16:45,623 INFO: Failed to execute no router bgp 5544 2021-03-05 05:16:45,735 INFO: Failed to execute no router bgp 2021-03-05 05:16:45,846 INFO: Failed to execute no router 2021-03-05 05:16:45,846 ERROR: "no router" we failed to remove this command 2021-03-05 05:16:45,847 ERROR: % Cannot delete default BGP instance. Dependent VRF instances exist Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-08tools: Mark reload failure when no form cli failsChirag Shah
if no form of the cli fails to execute, mark frr-reload as failure so return code can be nonzero. The similar approach is done for non no-form (add case) of the cli. Ticket:CM-33345 Reviewed By:CCR-11287 Testing Done: Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-02-26tools: add "show ip/ipv6 route" to zebra support bundle commandsIgor Ryzhov
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-26tools: fix zebra support bundle commandsIgor Ryzhov
CI constantly fails to execute "show zebra fpm stats": ``` Execute: show zebra fpm stats Traceback (most recent call last): File "/usr/lib/frr/generate_support_bundle.py", line 55, in executeCommand cmd_output = subprocess.check_output(cmd_exec_str, shell=True) File "/usr/lib/python3.6/subprocess.py", line 356, in check_output **kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 438, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'vtysh -c "show zebra fpm stats" ' returned non-zero exit status 1. ``` Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-02-18Merge pull request #7942 from donaldsharp/rpki_reload_fixDonatas Abraitis
frr-reload: rpki context exiting uses exit and not end
2021-02-15tests: make generate support bundle python3 onlyMark Stapp
Make the generate-support-bundle script and interactions more python3-friendly, and use python3 explicitly. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-02-04frr-reload: rpki context exiting uses exit and not endRunar Borge
Issue: The rpki subcontext uses exit instead of end to exit. This makes issues with frr-reload in the way that frr-reload never exits rpki context until it reaches the next end statement. this also happens when parsing the configuration from vtysh. Fixes: #7887 Signed-off-by: Runar Borge <runar@borge.nu>
2021-02-01tools/checkpatch: downgrade string concat warningDavid Lamparter
This is the best I can make the asm blocks in lib/xref.h look, so just mute the warning. (It shouldn't come in relevant for other code.) Signed-off-by: David Lamparter <equinox@diac24.net>
2021-01-26Merge pull request #7368 from eololab/add-pidfile-in-frr.serviceDonald Sharp
tools: add PIDFile option in frr.service
2021-01-20tools: fix frr-reload BFD profile supportRafael Zalamena
Fix the handling of multiple BFD profiles by adding the appropriated code to push/pop contexts inside BFD configuration node. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-01-13tools: ignore missing seq nums in prefix and access lists in frr-reload.pyDon Slice
If frr.conf contains a prefix-list or access-list without a seq number, frr-reload needs to be aware that it should not delete/add if the running config contains a seq number. Ticket: CM-32623 Signed-off-by: Don Slice <dslice@nvidia.com>
2021-01-13tools: apply black formatting changes to frr-reload.pyDon Slice
Since new workflow instructions state to run black against python change and it found formatting changes required that were not part of my change set, committing those changes separately. Signed-off-by: Don Slice <dslice@nvidia.com>
2021-01-09tools: fix pce-config removalEmanuele Di Pascale
make sure that the order in which the pcep-related commands are removed by frr-reload.py is the correct one, i.e., pce followed by pce-config followed by pcc. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-01-09pathd, tools: fix peer preference configEmanuele Di Pascale
on one hand, the default value for a peer preference was always being displayed, and on the other there was some code in frr-reload.py which was attempting to add a default value to match this behavior, and which was incorrectly overriding a specified preference. Fix this by removing this code and making pathd behave like other daemons in this respect, i.e. not displaying the default value. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-01-09tools: add bfdd to frr-reload.py daemons listEmanuele Di Pascale
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-01-08tools: Cleanup some zebra section of the support bundleDonald Sharp
a) Add some useful commands b) Remove `show error all` this just dumps the error codes. If we know the version we don't need this. Additionally this is rather large. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-01-08tools: Cleanup bgp commands in the support bundleDonald Sharp
Add some missing commands ( I am sure that there are more useful ones to ) Cleanup to use the modern non-deprecated syntax in case anyone runs across this. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-22Merge pull request #7472 from opensourcerouting/fpm-fixesMark Stapp
fpm: frr-reload, IPv6 and an improvement
2020-12-18pathd: Add optional support for PCEP to pathdSebastien Merle
This new dynamic module makes pathd behave as a PCC for dynamic candidate path using the external library pcpelib https://github.com/volta-networks/pceplib . The candidate paths defined as dynamic will trigger computation requests to the configured PCE, and the PCE response will be used to update the policy. It supports multiple PCE. The one with smaller precedence will be elected as the master PCE, and only if the connection repeatedly fails, the PCC will switch to another PCE. Example of configuration: segment-routing traffic-eng pcep pce-config CONF source-address ip 10.10.10.10 sr-draft07 ! pce PCE1 config CONF address ip 1.1.1.1 ! pce PCE2 config CONF address ip 2.2.2.2 ! pcc peer PCE1 precedence 10 peer PCE2 precedence 20 ! ! ! ! Co-authored-by: Brady Johnson <brady@voltanet.io> Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io> Co-authored-by: GalaxyGorilla <sascha@netdef.org> Co-authored-by: Javier Garcia <javier.garcia@voltanet.io> Co-authored-by: Renato Westphal <renato@opensourcerouting.org> Co-authored-by: Sebastien Merle <sebastien@netdef.org> Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-12-18pathd: New SR-TE policy management daemonSebastien Merle
This new daemon manages Segment-Routing Traffic-Engineering (SR-TE) Policies and installs them into zebra. It provides the usual yang support and vtysh commands to define or change SR-TE Policies. In a nutshell SR-TE Policies provide the possibility to steer traffic through a (possibly dynamic) list of Segment Routing segments to the endpoint of the policy. This list of segments is part of a Candidate Path which again belongs to the SR-TE Policy. SR-TE Policies are uniquely identified by their color and endpoint. The color can be used to e.g. match BGP communities on incoming traffic. There can be multiple Candidate Paths for a single policy, the active Candidate Path is chosen according to certain conditions of which the most important is its preference. Candidate Paths can be explicit (fixed list of segments) or dynamic (list of segment comes from e.g. PCEP, see below). Configuration example: segment-routing traffic-eng segment-list SL index 10 mpls label 1111 index 20 mpls label 2222 ! policy color 4 endpoint 10.10.10.4 name POL4 binding-sid 104 candidate-path preference 100 name exp explicit segment-list SL candidate-path preference 200 name dyn dynamic ! ! ! There is an important connection between dynamic Candidate Paths and the overall topic of Path Computation. Later on for pathd a dynamic module will be introduced that is capable of communicating via the PCEP protocol with a PCE (Path Computation Element) which again is capable of calculating paths according to its local TED (Traffic Engineering Database). This dynamic module will be able to inject the mentioned dynamic Candidate Paths into pathd based on calculated paths from a PCE. https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06 Co-authored-by: Sebastien Merle <sebastien@netdef.org> Co-authored-by: Renato Westphal <renato@opensourcerouting.org> Co-authored-by: GalaxyGorilla <sascha@netdef.org> Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io> Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-12-07Merge pull request #7582 from AnuradhaKaruppiah/frr-reload-cleanupRuss White
frr reload fixes for mac and ip normalization
2020-12-03tools: make frr-reload handle fpm commandsRafael Zalamena
Instruct `frr-reload.py` to not use `fpm` commands as configuration node. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-12-01tools: Fix run folder permissionsJavier Garcia
In the case of some linux distros the /var/run dir is mounted with tmpfs so in every reboot it's removed. Then the frrcommon.sh will recreate it without 'x' perm So no pid file cannot be created in /var/run/frr Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
2020-11-21frr-reload: ignore-case in the es-id and es-sys-mac config comparisonsAnuradha Karuppiah
MAC address can be configured as lower/upper hex characters but is always rendered as lower case in "show run". Avoid incorrect "change detection" by ignoring case. Ticket: CM-32235 Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2020-11-21frr-reload: fixup ipv6 address normalizationAnuradha Karuppiah
The condition to normalize ipv6 addresses was accidentally broken via - [ e238920df07be0b61e483f0a58e0b99ab3d2e0ea tools: Fix reload with 'ipv6 address...' in interface ] The condition was supposed to be skipped only if "ipv6 add" was present in the line. Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-11-19Revert "debian: Adjust tarsource.sh to use native debian/changelog"Quentin Young
This reverts commit 4ffb9a4c9ddd0ef3f770c0bc2674c4818331780d.
2020-11-19Revert "debian: Update tools/build-debian-package.sh to use git-buildpackage"Quentin Young
This reverts commit 63c0c8ed89e1564294ff174b819e520d5977f499.
2020-11-19Revert "debian: Remove the changelog-auto automation in favor of dch"Quentin Young
This reverts commit cace1d9bf178d447599fe7caa5ccad9a89babe03.
2020-11-19Revert "debian: Remove now obsolete tarsource.sh script"Quentin Young
This reverts commit bc304e08ea48523b4c70d1d330eaefba3b6b7a6c.
2020-11-19Revert "debian: Update the tools/build-debian-package.sh to be example build ↵Quentin Young
script" This reverts commit c950a7f214cd713652da1b6b78eca9278c33b448.