Skip to content

Commit

Permalink
Updated with a missing , in the database_config.json.j2 file, Do pip …
Browse files Browse the repository at this point in the history
…install of j2cli in docker-base-buster.
  • Loading branch information
judyjoseph committed May 7, 2020
1 parent b7bc8ef commit 73b6fac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dockers/docker-base-buster/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN apt-get update && \
perl \
procps \
python \
python-pip \
rsyslog \
vim-tiny \
# Install dependencies of supervisor
Expand All @@ -66,6 +67,9 @@ RUN apt-get -y install \
iproute2 \
net-tools

# For templating
RUN pip install j2cli

RUN mkdir -p /etc/supervisor /var/log/supervisor

RUN apt-get -y purge \
Expand Down
2 changes: 1 addition & 1 deletion dockers/docker-database/database_config.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"redis":{
"hostname" : "127.0.0.1",
"port" : 6379,
"unix_socket_path" : "/var/run/redis{{NAMESPACE_ID}}/redis.sock"
"unix_socket_path" : "/var/run/redis{{NAMESPACE_ID}}/redis.sock",
"persistence_for_warm_boot" : "yes"
}
},
Expand Down
1 change: 1 addition & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ start() {
# various namesapces. The database_config paths are relative to the DIR of SONIC_DB_GLOBAL_JSON.
SONIC_DB_GLOBAL_JSON="/var/run/redis/sonic-db/database_global.json"
if [ -f "$SONIC_DB_GLOBAL_JSON" ]; then
# TODO Create a separate python script with the below logic and invoke it here.
redis_dir_list=`/usr/bin/python -c "import sys; import os; import json; f=open(sys.argv[1]); \
global_db_dir = os.path.dirname(sys.argv[1]); data=json.load(f); \
print(\" \".join([os.path.normpath(global_db_dir+'/'+elem['include']).partition('sonic-db')[0]\
Expand Down

0 comments on commit 73b6fac

Please sign in to comment.