Skip to content

Commit

Permalink
support for multi-asic platform
Browse files Browse the repository at this point in the history
  • Loading branch information
tahmed-dev committed Sep 1, 2020
1 parent 9a51470 commit 5a14b5f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function postStartAction()
fi
fi
# Add redis UDS to the redis group and give read/write access to the group
REDIS_SOCK="/var/run/redis/redis.sock"
REDIS_SOCK="/var/run/redis${DEV}/redis.sock"
chgrp -f redis $REDIS_SOCK && chmod -f 0760 $REDIS_SOCK
{%- elif docker_container_name == "swss" %}
docker exec swss$DEV rm -f /ready # remove cruft
Expand Down Expand Up @@ -357,13 +357,8 @@ NAMESPACE_PREFIX="asic"
if [ "$DEV" ]; then
NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace

# While using -n (namespace) argument, sonic-cfggen/sonic-db-cli uses redis UNIX socket
# for accessing redis DB in a namespace. This unix socket has permission restrictions since
# it is created by systemd database.servce started with [User] as [root].
# sudo is needed here for services which are started by systemd with [User] as [admin]
# and needs to override this unix socket permission restrictions.
SONIC_CFGGEN="sudo sonic-cfggen -n $NET_NS"
SONIC_DB_CLI="sudo sonic-db-cli -n $NET_NS"
SONIC_CFGGEN="sonic-cfggen -n $NET_NS"
SONIC_DB_CLI="sonic-db-cli -n $NET_NS"
else
NET_NS=""
SONIC_CFGGEN="sonic-cfggen"
Expand Down

0 comments on commit 5a14b5f

Please sign in to comment.