Skip to content

Commit

Permalink
[frr]: change frr as default sonic routing stack (sonic-net#2863)
Browse files Browse the repository at this point in the history
* [frr]: change frr as default sonic routing stack

* fix quagga configuration

* [vstest]: fix bgp test for frr

* [vstest]: skip bgp/test_invalid_nexthop.py for frr

Signed-off-by: Guohan Lu <gulv@microsoft.com>
  • Loading branch information
lguohan authored and MichelMoriniaux committed May 28, 2019
1 parent d0be8e9 commit ad880e9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ COPY ["files/sonic_version.yml", "/etc/sonic/"]
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump

RUN echo "docker-sonic-vs" > /etc/hostname
RUN mkdir -p /etc/quagga
RUN touch /etc/quagga/zebra.conf

# disable integrated vtysh config
RUN rm /etc/frr/frr.conf

# Create /var/warmboot/teamd folder for teammgrd
RUN mkdir -p /var/warmboot/teamd

Expand Down
4 changes: 2 additions & 2 deletions platform/vs/docker-sonic-vs/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ stdout_logfile=syslog
stderr_logfile=syslog

[program:zebra]
command=/usr/lib/quagga/zebra -A 127.0.0.1
command=/usr/lib/frr/zebra -A 127.0.0.1
priority=13
autostart=false
autorestart=false
stdout_logfile=syslog
stderr_logfile=syslog

[program:bgpd]
command=/usr/lib/quagga/bgpd -A 127.0.0.1 -F
command=/usr/lib/frr/bgpd -A 127.0.0.1
priority=14
autostart=false
autorestart=false
Expand Down
4 changes: 2 additions & 2 deletions platform/vs/tests/bgp/test_gr_livelock.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_gr_livelock(dvs, testlog):
# update exabgp to version 4.0.10
dvs.servers[0].runcmd("pip install 'exabgp==4.0.10' --force-reinstall ")
#
dvs.copy_file("/etc/quagga/", "bgp/files/gr_livelock/bgpd.conf")
dvs.copy_file("/etc/frr/", "bgp/files/gr_livelock/bgpd.conf")
dvs.servers[0].runcmd("pkill exabgp") # In case previous test didn't stop exa
dvs.runcmd("supervisorctl stop bgpd")
time.sleep(5)
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_gr_livelock(dvs, testlog):
run_exacli(dvs, 0, 'shutdown')
p1 = p1.wait()

# Wait until quagga thinks that 1st neighbor was shut down
# Wait until frr thinks that 1st neighbor was shut down
time.sleep(300)

# Start the 1st neighbor again with graceful restart enabled
Expand Down
6 changes: 4 additions & 2 deletions platform/vs/tests/bgp/test_invalid_nexthop.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import re
import time
import json
import pytest

@pytest.mark.skip(reason="not working for frr")
def test_InvalidNexthop(dvs, testlog):

dvs.copy_file("/etc/quagga/", "bgp/files/invalid_nexthop/bgpd.conf")
dvs.copy_file("/etc/frr/", "bgp/files/invalid_nexthop/bgpd.conf")
dvs.runcmd("supervisorctl start bgpd")
dvs.runcmd("ip addr add fc00::1/126 dev Ethernet0")
dvs.runcmd("ifconfig Ethernet0 up")
Expand All @@ -22,7 +24,7 @@ def test_InvalidNexthop(dvs, testlog):

time.sleep(10)

(exit_code, output) = dvs.runcmd(["vtysh", "-c", "show ipv6 bgp"])
(exit_code, output) = dvs.runcmd(["vtysh", "-c", "show bgp ipv6"])

p.terminate()
p = p.wait()
Expand Down
2 changes: 1 addition & 1 deletion platform/vs/tests/bgp/test_no_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def test_bounce(dvs, testlog):
dvs.servers[0].runcmd("pkill -f exabgp")
dvs.copy_file("/etc/quagga/", "bgp/files/no_export/bgpd.conf")
dvs.copy_file("/etc/frr/", "bgp/files/no_export/bgpd.conf")
dvs.runcmd("supervisorctl start bgpd")
dvs.runcmd("ip addr add 10.0.0.0/31 dev Ethernet0")
dvs.runcmd("ifconfig Ethernet0 up")
Expand Down
2 changes: 1 addition & 1 deletion rules/config
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ DEFAULT_PASSWORD = YourPaSsWoRd
# SONIC_ROUTING_STACK - specify the routing-stack being elected to drive SONiC's control-plane.
# Supported routing stacks on SONiC are:
# routing-stacks: quagga, frr.
SONIC_ROUTING_STACK = quagga
SONIC_ROUTING_STACK = frr

# ENABLE_SYNCD_RPC - build docker-syncd with rpc packages for testing purposes.
# Uncomment to enable:
Expand Down

0 comments on commit ad880e9

Please sign in to comment.