Merge pull request #354 from apwiggins/frr-service-reset-interfaces

added reset interfaces at FRR startup
This commit is contained in:
bharnden 2020-02-04 13:02:43 -08:00 committed by GitHub
commit 9216683902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,7 +131,7 @@ class FRRZebra(CoreService):
frr_sbin_search = node.session.options.get_config(
"frr_sbin_search", default='"/usr/local/sbin /usr/sbin /usr/lib/frr"'
)
return """\
cfg = """\
#!/bin/sh
# auto-generated by zebra service (frr.py)
FRR_CONF=%s
@ -225,6 +225,7 @@ if [ "$1" != "zebra" ]; then
echo "WARNING: '$1': all FRR daemons are launched by the 'zebra' service!"
exit 1
fi
confcheck
bootfrr
""" % (
@ -233,6 +234,11 @@ bootfrr
frr_bin_search,
constants.FRR_STATE_DIR,
)
for ifc in node.netifs():
cfg += f"ip link set dev {ifc.name} down\n"
cfg += "sleep 1\n"
cfg += f"ip link set dev {ifc.name} up\n"
return cfg
@classmethod
def generateFrrDaemons(cls, node):