Skip to content

Commit

Permalink
docker-syncd-cavm : Added synchronization between syncd and redis (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
garyachy authored and lguohan committed Nov 28, 2016
1 parent 96c2834 commit 57ff53e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dockers/docker-syncd-cavm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

This comment has been minimized.

Copy link
@marian-pritsak

marian-pritsak Nov 29, 2016

Collaborator

Redis is built from sources
You should install local debian package instead of using APT repo
(Take a look at hiredis for instance)


COPY ["start.sh", "/usr/bin/"]

Expand Down
19 changes: 18 additions & 1 deletion dockers/docker-syncd-cavm/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 57ff53e

Please sign in to comment.