Go to file
Quentin Young fdaee098f3 tools: fix vtysh failure error handling
Based on the current code, I think the intent was to gracefully handle
vtysh failures and print a useful error message. Barriers in the way of
that:

- Despite reading the results of subprocess.communicate(), there won't
  be anything there, because we aren't passing subprocess.PIPE as stdin
  and stderr when calling subprocess.Popen()
- Despite catching subprocess.TimeoutExpired, if we were to actually hit
  this case frr-reload.py would just crash because it's calling
  .communicate() on an unbound process variable, probably a copy-paste
  error
- Aside from that, building a kwargs dict to pass to a function that
  contains something if something else is not None and nothing if it is,
  is pointless when we could just pass the thing itself

Net result is that if vtysh fails to read an frr.conf due to syntax
errors, instead of crashing with a traceback, we actually handle the
error condition, log the problem and vtysh's output, and exit. Actually
we were printing the failed line just by chance because stderr wasn't
captured from the subprocess and I guess showed up as part of systemd's
error capturing or something, but the traceback did a good job of
obscuring that with useless noise.

Old:

frrinit.sh[32183]:  * Started watchfrr
frrinit.sh[32183]: line 20: % Unknown command: eee
frrinit.sh[32183]: Traceback (most recent call last):
frrinit.sh[32183]:   File "/usr/lib/frr/frr-reload.py", line 1316, in <module>
frrinit.sh[32183]:     newconf.load_from_file(args.filename)
frrinit.sh[32183]:   File "/usr/lib/frr/frr-reload.py", line 231, in load_from_file
frrinit.sh[32183]:     file_output = self.vtysh.mark_file(filename)
frrinit.sh[32183]:   File "/usr/lib/frr/frr-reload.py", line 146, in mark_file
frrinit.sh[32183]:     % (child.returncode, stderr))
frrinit.sh[32183]: __main__.VtyshException: vtysh (mark file) exited with status 2:
frrinit.sh[32183]: None

New:

frrinit.sh[30090]:  * Started watchfrr
frrinit.sh[30090]: vtysh failed to process new configuration: vtysh (mark file) exited with status 2:
frrinit.sh[30090]: line 20: % Unknown command: eee

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-09-17 15:53:42 -04:00
.github github: Add lost chapter witch issue template 2020-08-25 21:44:13 +03:00
alpine alpine: enable multi-arch builds 2020-06-24 16:33:18 -04:00
babeld *: un-split strings across lines 2020-07-14 10:37:25 +02:00
bfdd bfdd: fix parameter length 2020-08-24 18:45:53 +03:00
bgpd Merge pull request #7114 from donaldsharp/tip_count 2020-09-17 15:10:13 +03:00
debian build, yang: bump libyang minimum required version to 1.0.184 2020-08-07 14:07:46 -03:00
doc Merge pull request #7099 from mjstapp/fix_doc_thread_rw 2020-09-15 11:20:13 -04:00
docker docker: don't fail on chown /etc/frr 2020-06-10 00:20:04 -04:00
eigrpd eigrpd: make show ip eigrp vrf all neighbor work correctly 2020-08-31 14:42:09 -04:00
fpm *: Replace sizeof something to sizeof(something) 2020-03-08 21:44:53 +02:00
gdb bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
grpc lib: don't ignore error messages generated during the commit apply phase 2020-08-14 21:37:14 -03:00
include linux: UAPI for MAC sync 2020-08-05 06:46:12 -07:00
isisd Merge pull request #7082 from volta-networks/fix_isis_pseudo_lsp 2020-09-15 11:25:04 -03:00
ldpd Merge pull request #6789 from volta-networks/feat_ldp_igp_sync 2020-09-11 15:55:04 -03:00
lib Merge pull request #7103 from opensourcerouting/sysrepo-fixes 2020-09-16 20:34:53 -04:00
m4 build: find all future minor versions of python3 2020-07-09 06:47:31 +02:00
mlag zebra: Do not build mlag protobuf support if version 3 is not avail 2019-12-15 09:37:51 -05:00
nhrpd lib: fix crashes with leafrefs that point to non-implemented modules 2020-09-11 14:42:35 -03:00
ospf6d ospf6d: fix SA warning 2020-09-03 12:57:36 -04:00
ospfclient *: Replace s_addr 0 => INADDR_ANY 2020-02-06 09:00:12 +02:00
ospfd Merge pull request #6789 from volta-networks/feat_ldp_igp_sync 2020-09-11 15:55:04 -03:00
pbrd Merge pull request #7093 from donaldsharp/pbr_flapping 2020-09-14 08:13:48 -04:00
pimd pimd: Warn when we try to build MAXVIFS > 256 2020-09-11 20:06:06 -04:00
pkgsrc *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
python python: Make FRR build compatible with python 2.7 and 3.x 2020-08-19 19:38:28 +02:00
qpb build: add LLVM bitcode targets 2020-05-05 14:39:12 +02:00
redhat build, yang: bump libyang minimum required version to 1.0.184 2020-08-07 14:07:46 -03:00
ripd *: introduce DEFPY_YANG & friends 2020-08-03 15:17:03 -03:00
ripngd *: introduce DEFPY_YANG & friends 2020-08-03 15:17:03 -03:00
sharpd sharpd: add a command to send ARP/NDP requests 2020-08-12 23:20:04 +02:00
snapcraft snapcraft: Update libyang version 2020-09-10 09:13:36 -04:00
solaris doc: rename man pages to frr-* 2020-01-15 14:05:11 +01:00
staticd staticd: fix display of the "nexthop-vrf" parameter of static routes 2020-09-11 15:13:22 -03:00
tests Merge pull request #7066 from donaldsharp/more_test_speedups 2020-09-16 22:27:16 +02:00
tools tools: fix vtysh failure error handling 2020-09-17 15:53:42 -04:00
vrrpd Merge pull request #6908 from qlyoung/vrrp-add-vrf-module 2020-08-13 11:10:03 -03:00
vtysh doc, yang, isisd : Support for different VRF in isisd 2020-09-01 00:48:05 -07:00
watchfrr watchfrr: add (network) namespace support 2020-07-22 12:56:04 +02:00
yang Merge pull request #6789 from volta-networks/feat_ldp_igp_sync 2020-09-11 15:55:04 -03:00
zebra zebra: fixup a neigh del bug introduced by a previous commit for MAC-IP sync 2020-09-16 17:32:33 -07:00
.clang-format clang-format: add FOREACH_SAFI to the ForEachMacros list 2020-08-03 12:18:24 -03:00
.dir-locals.el tools: fix emacs configuration file 2019-11-04 11:45:52 -03:00
.dockerignore docker: Make docker image on CentOS 7 2019-11-26 19:29:30 +00:00
.git-blame-ignore-revs *: Give git a clue about our whitespace changes 2020-08-18 07:54:07 -04:00
.gitignore python: add graphviz callgraphs 2020-05-05 14:39:12 +02:00
bootstrap.sh autoreconf -i 2007-02-06 19:28:28 +00:00
buildtest.sh config: switch a few references to say FRR 2017-07-12 11:25:33 -05:00
changelog-auto.in debian: cleanly split off from dist tarball 2019-02-19 21:31:18 +01:00
config.version.in build: carry --with-pkg-extra-version into tarballs 2018-10-24 15:11:50 +02:00
configure.ac *: Update version string 2020-09-09 10:10:54 -04:00
COPYING *: make consistent & update GPLv2 file headers 2017-05-15 16:37:41 +02:00
COPYING-LGPLv2.1 build: remove LGPL v2.0, add LGPL v2.1 2016-11-15 17:19:38 +09:00
Makefile.am python: add graphviz callgraphs 2020-05-05 14:39:12 +02:00
README.md README.md: Add FRR Icon 2019-10-29 12:42:06 -04:00
stamp-h.in Initial revision 2002-12-13 20:15:29 +00:00

Icon

FRRouting

FRR is free software that implements and manages various IPv4 and IPv6 routing protocols. It runs on nearly all distributions of Linux and BSD as well as Solaris and supports all modern CPU architectures.

FRR currently supports the following protocols:

  • BGP
  • OSPFv2
  • OSPFv3
  • RIPv1
  • RIPv2
  • RIPng
  • IS-IS
  • PIM-SM/MSDP
  • LDP
  • BFD
  • Babel
  • PBR
  • OpenFabric
  • VRRP
  • EIGRP (alpha)
  • NHRP (alpha)

Installation & Use

For source tarballs, see the releases page.

For Debian and its derivatives, use the APT repository at https://deb.frrouting.org/.

Instructions on building and installing from source for supported platforms may be found in the developer docs.

Once installed, please refer to the user guide for instructions on use.

Community

The FRRouting email list server is located here and offers the following public lists:

Topic List
Development dev@lists.frrouting.org
Users & Operators frog@lists.frrouting.org
Announcements announce@lists.frrouting.org

For chat, we currently use Slack. You can join by clicking the "Slack" link under the Participate section of our website.

Contributing

FRR maintains developer's documentation which contains the project workflow and expectations for contributors. Some technical documentation on project internals is also available.

We welcome and appreciate all contributions, no matter how small!

Security

To report security issues, please use our security mailing list:

security [at] lists.frrouting.org