[teamd]: Add redis-tools as the dependency of docker-teamd and fix bugs (#363)

- Fix the if condition bug to wait till PORT_TABLE:ConfigDone before start

Signed-off-by: Shuotian Cheng <shuche@microsoft.com>
This commit is contained in:
Shuotian Cheng 2017-03-02 18:07:43 -08:00 committed by GitHub
parent d3891a2a42
commit f9d8137975
3 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,10 @@ FROM docker-config-engine
RUN apt-get update && apt-get install -f -y libdbus-1-3 libdaemon0 libjansson4
## Install redis-tools dependencies
## TODO: implicitly install dependencies
RUN apt-get -y install libjemalloc1
COPY \
{% for deb in docker_teamd_debs.split(' ') -%}
debs/{{ deb }}{{' '}}

View File

@ -36,7 +36,7 @@ service rsyslog start
while true; do
# Check if front-panel ports are configured
result=`echo -en "SELECT 0\nHGETALL PORT_TABLE:ConfigDone" | redis-cli | sed -n 3p`
if [ "$result" != "0" ]; then
if [ "$result" == "0" ]; then
start_app
read
fi

View File

@ -2,7 +2,7 @@
DOCKER_TEAMD = docker-teamd.gz
$(DOCKER_TEAMD)_PATH = $(DOCKERS_PATH)/docker-teamd
$(DOCKER_TEAMD)_DEPENDS += $(SWSS) $(LIBTEAMDCT) $(LIBTEAM_UTILS)
$(DOCKER_TEAMD)_DEPENDS += $(SWSS) $(LIBTEAMDCT) $(LIBTEAM_UTILS) $(REDIS_TOOLS)
$(DOCKER_TEAMD)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE)
SONIC_DOCKER_IMAGES += $(DOCKER_TEAMD)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_TEAMD)