From 50b4868a991b40b4ea5421776daa1a3ee8e4a95e Mon Sep 17 00:00:00 2001 From: lguohan Date: Mon, 13 Nov 2017 14:38:07 -0800 Subject: [PATCH] [vs]: update virtual switch (#1148) * [vs]: add zebra/quagga/fpmsyncd in supervisord.conf * setup the hostname for vs docker * do not save to the disk for redis db * install ipaddress module in vs docker * update sonic-sairedis submodule --- platform/vs/docker-sonic-vs/Dockerfile.j2 | 11 +++++++-- platform/vs/docker-sonic-vs/start.sh | 2 ++ platform/vs/docker-sonic-vs/supervisord.conf | 24 ++++++++++++++++++++ src/sonic-sairedis | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/platform/vs/docker-sonic-vs/Dockerfile.j2 b/platform/vs/docker-sonic-vs/Dockerfile.j2 index 32b91e8cf44a..fe6ca837a11b 100644 --- a/platform/vs/docker-sonic-vs/Dockerfile.j2 +++ b/platform/vs/docker-sonic-vs/Dockerfile.j2 @@ -28,6 +28,9 @@ RUN apt-get install -y net-tools \ iproute \ libpython2.7 +RUN pip install setuptools \ + py2_ipaddress + COPY \ {% for deb in docker_sonic_vs_debs.split(' ') -%} debs/{{ deb }}{{' '}} @@ -43,10 +46,12 @@ debs/{{ deb }}{{' '}} RUN apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y RUN rm -rf /debs -RUN sed -ri 's/^daemonize yes$/daemonize no/; \ +RUN sed -ri 's/^(save .*$)/# \1/g; \ + s/^daemonize yes$/daemonize no/; \ s/^logfile .*$/logfile ""/; \ s/^# syslog-enabled no$/syslog-enabled no/; \ - s/^# unixsocket/unixsocket/ \ + s/^# unixsocket/unixsocket/; \ + s/^client-output-buffer-limit pubsub [0-9]+mb [0-9]+mb [0-9]+/client-output-buffer-limit pubsub 0 0 0/ \ ' /etc/redis/redis.conf COPY ["50-default.conf", "/etc/rsyslog.d/"] @@ -54,4 +59,6 @@ COPY ["start.sh", "orchagent.sh", "/usr/bin/"] COPY ["brcm.profile.ini", "/usr/share/sonic/device/vswitch/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] +RUN echo "docker-sonic-vs" > /etc/hostname + ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/platform/vs/docker-sonic-vs/start.sh b/platform/vs/docker-sonic-vs/start.sh index 07d0fb7a0426..0782705bc912 100755 --- a/platform/vs/docker-sonic-vs/start.sh +++ b/platform/vs/docker-sonic-vs/start.sh @@ -28,6 +28,8 @@ supervisorctl start neighsyncd supervisorctl start teamsyncd +supervisorctl start fpmsyncd + # Start arp_update when VLAN exists # VLAN=`sonic-cfggen -d -v 'VLAN.keys() | join(" ") if VLAN'` # if [ "$VLAN" != "" ]; then diff --git a/platform/vs/docker-sonic-vs/supervisord.conf b/platform/vs/docker-sonic-vs/supervisord.conf index c6fefef1415a..c91d808b9856 100644 --- a/platform/vs/docker-sonic-vs/supervisord.conf +++ b/platform/vs/docker-sonic-vs/supervisord.conf @@ -74,3 +74,27 @@ autostart=false autorestart=false stdout_logfile=syslog stderr_logfile=syslog + +[program:zebra] +command=/usr/lib/quagga/zebra -A 127.0.0.1 +priority=10 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + +[program:bgpd] +command=/usr/lib/quagga/bgpd -A 127.0.0.1 -F +priority=11 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog + +[program:fpmsyncd] +command=/usr/bin/fpmsyncd +priority=12 +autostart=false +autorestart=false +stdout_logfile=syslog +stderr_logfile=syslog diff --git a/src/sonic-sairedis b/src/sonic-sairedis index f5d9c8364f5f..d11f5501ff15 160000 --- a/src/sonic-sairedis +++ b/src/sonic-sairedis @@ -1 +1 @@ -Subproject commit f5d9c8364f5fbcc487a5f1a3e3e6203ab2293a83 +Subproject commit d11f5501ff15cff7361c397ec937327ce343c94b