docker-syncd-cavm : Added synchronization between syncd and redis (#79)

This commit is contained in:
Denys Haryachyy 2016-11-28 22:14:27 +02:00 committed by lguohan
parent 96c2834cad
commit 57ff53ea60
2 changed files with 19 additions and 2 deletions

View File

@ -18,7 +18,7 @@ RUN dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return
&& dpkg_apt /deps/libsaimetadata_*.deb \
&& dpkg_apt /deps/syncd_*.deb
RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev
RUN apt-get -y install libpcap-dev libxml2-dev python-dev swig libsensors4-dev redis-tools
COPY ["start.sh", "/usr/bin/"]

View File

@ -3,4 +3,21 @@
export XP_ROOT=/usr/bin/
service rsyslog start
syncd -p /etc/ssw/AS7512/profile.ini -N
while true; do
# Check if redis-server starts
result=$(redis-cli ping)
if [ "$result" == "PONG" ]; then
redis-cli FLUSHALL
syncd -p /etc/ssw/AS7512/profile.ini -N
break
fi
sleep 1
done