![]() 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> |
||
---|---|---|
.github | ||
alpine | ||
babeld | ||
bfdd | ||
bgpd | ||
debian | ||
doc | ||
docker | ||
eigrpd | ||
fpm | ||
gdb | ||
grpc | ||
include | ||
isisd | ||
ldpd | ||
lib | ||
m4 | ||
mlag | ||
nhrpd | ||
ospf6d | ||
ospfclient | ||
ospfd | ||
pbrd | ||
pimd | ||
pkgsrc | ||
python | ||
qpb | ||
redhat | ||
ripd | ||
ripngd | ||
sharpd | ||
snapcraft | ||
solaris | ||
staticd | ||
tests | ||
tools | ||
vrrpd | ||
vtysh | ||
watchfrr | ||
yang | ||
zebra | ||
.clang-format | ||
.dir-locals.el | ||
.dockerignore | ||
.git-blame-ignore-revs | ||
.gitignore | ||
bootstrap.sh | ||
buildtest.sh | ||
changelog-auto.in | ||
config.version.in | ||
configure.ac | ||
COPYING | ||
COPYING-LGPLv2.1 | ||
Makefile.am | ||
README.md | ||
stamp-h.in |
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