Restore neighbor table to kernel during system warm-reboot (#2213)
* Restore neighbor table to kernel during system warm-reboot Added a service: "restore_neighbors" to restore neighbor table into kernel during system warm reboot. The service is started by supervisord in swss docker when the docker is started. In case system warm reboot is enabled, it will try to restore the neighbor table from appDB into kernel through netlink API calls and update the neighbor table by sending arp/ns requests to all neighbor entries, then it sets the stateDB flag for neighsyncd to continue the reconciliation process. -- Added tcpdump python-scapy debian package into orchagent and vs dockers. -- Added python module: pyroute2 netifaces into orchagent and vc dockers. -- Workarounded tcpdump issue in the vs docker Signed-off-by: Zhenggen Xu <zxu@linkedin.com> * Move the restore_neighbors.py to sonic-swss submodule Made changes to makefiles accordingly Make dockerfile.j2 changes and supervisord config changes Add python monotonic lib for time access Signed-off-by: Zhenggen Xu <zxu@linkedin.com> * Added PYTHON_SWSSCOMMON as swss runtime dependency Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
This commit is contained in:
parent
61fe8fd2b5
commit
51a76614a3
@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update
|
||||
|
||||
# Install required packages
|
||||
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute
|
||||
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libc-ares2 iproute libpython2.7
|
||||
|
||||
{% if docker_fpm_frr_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
|
@ -10,7 +10,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update
|
||||
|
||||
# Install required packages
|
||||
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4
|
||||
RUN apt-get install -y libdbus-1-3 libdaemon0 libjansson4 libpython2.7
|
||||
|
||||
{% if docker_fpm_quagga_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
|
@ -8,15 +8,19 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -f -y ifupdown arping libdbus-1-3 libdaemon0 libjansson4
|
||||
RUN apt-get install -f -y ifupdown arping libdbus-1-3 libdaemon0 libjansson4 libpython2.7
|
||||
|
||||
RUN apt-get install -f -y ndisc6
|
||||
RUN apt-get install -f -y ndisc6 tcpdump python-scapy
|
||||
## Install redis-tools dependencies
|
||||
## TODO: implicitly install dependencies
|
||||
RUN apt-get -y install libjemalloc1
|
||||
|
||||
RUN apt-get install -y libelf1 libmnl0
|
||||
|
||||
RUN pip install setuptools
|
||||
RUN pip install pyroute2==0.5.3 netifaces==0.10.7
|
||||
RUN pip install monotonic==1.5
|
||||
|
||||
COPY \
|
||||
{% for deb in docker_orchagent_debs.split(' ') -%}
|
||||
debs/{{ deb }}{{' '}}
|
||||
|
@ -19,6 +19,8 @@ supervisorctl start rsyslogd
|
||||
|
||||
supervisorctl start orchagent
|
||||
|
||||
supervisorctl start restore_neighbors
|
||||
|
||||
supervisorctl start portsyncd
|
||||
|
||||
supervisorctl start intfsyncd
|
||||
|
@ -116,3 +116,14 @@ autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:restore_neighbors]
|
||||
command=/usr/bin/restore_neighbors.py
|
||||
priority=15
|
||||
autostart=false
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
startretries=0
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
|
@ -8,7 +8,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4
|
||||
RUN apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4 libpython2.7
|
||||
|
||||
## Install redis-tools dependencies
|
||||
## TODO: implicitly install dependencies
|
||||
|
@ -45,11 +45,15 @@ RUN apt-get install -y net-tools \
|
||||
libmnl0 \
|
||||
logrotate \
|
||||
apt-utils \
|
||||
psmisc
|
||||
psmisc \
|
||||
tcpdump \
|
||||
python-scapy
|
||||
|
||||
RUN pip install setuptools
|
||||
RUN pip install py2_ipaddress
|
||||
RUN pip install six
|
||||
RUN pip install pyroute2==0.5.3 netifaces==0.10.7
|
||||
RUN pip install monotonic==1.5
|
||||
|
||||
{% if docker_sonic_vs_debs.strip() -%}
|
||||
# Copy locally-built Debian package dependencies
|
||||
@ -87,6 +91,9 @@ COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
|
||||
COPY ["files/configdb-load.sh", "/usr/bin/"]
|
||||
COPY ["files/arp_update", "/usr/bin"]
|
||||
|
||||
# Workaround the tcpdump issue
|
||||
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
|
||||
|
||||
RUN echo "docker-sonic-vs" > /etc/hostname
|
||||
RUN touch /etc/quagga/zebra.conf
|
||||
|
||||
|
@ -154,3 +154,13 @@ autostart=false
|
||||
autorestart=false
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
||||
[program:restore_neighbors]
|
||||
command=/usr/bin/restore_neighbors.py
|
||||
priority=19
|
||||
autostart=false
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
startretries=0
|
||||
stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
|
@ -4,7 +4,7 @@ SWSS = swss_1.0.0_amd64.deb
|
||||
$(SWSS)_SRC_PATH = $(SRC_PATH)/sonic-swss
|
||||
$(SWSS)_DEPENDS += $(LIBSAIREDIS_DEV) $(LIBSAIMETADATA_DEV) $(LIBTEAM_DEV) \
|
||||
$(LIBTEAMDCT) $(LIBTEAM_UTILS) $(LIBSWSSCOMMON_DEV)
|
||||
$(SWSS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTEAM) $(LIBSWSSCOMMON)
|
||||
$(SWSS)_RDEPENDS += $(LIBSAIREDIS) $(LIBSAIMETADATA) $(LIBTEAM) $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON)
|
||||
SONIC_DPKG_DEBS += $(SWSS)
|
||||
|
||||
SWSS_DBG = swss-dbg_1.0.0_amd64.deb
|
||||
|
Reference in New Issue
Block a user