This commit is contained in:
parent
4600929f96
commit
74a7d2d751
@ -37,12 +37,12 @@ RUN apt-get clean -y && \
|
||||
' /etc/redis/redis.conf
|
||||
|
||||
COPY ["supervisord.conf.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["critical_processes.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["docker-database-init.sh", "/usr/local/bin/"]
|
||||
COPY ["database_config.json.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["database_global.json.j2", "/usr/share/sonic/templates/"]
|
||||
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
||||
COPY ["files/sysctl-net.conf", "/etc/sysctl.d/"]
|
||||
COPY ["critical_processes", "/etc/supervisor"]
|
||||
COPY ["files/update_chassisdb_config", "/usr/local/bin/"]
|
||||
COPY ["flush_unused_database", "/usr/local/bin/"]
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
program:redis
|
5
dockers/docker-database/critical_processes.j2
Normal file
5
dockers/docker-database/critical_processes.j2
Normal file
@ -0,0 +1,5 @@
|
||||
{% if INSTANCES %}
|
||||
{% for redis_inst, redis_items in INSTANCES.items() %}
|
||||
program:{{ redis_inst }}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
@ -52,6 +52,7 @@ if [[ $DATABASE_TYPE == "chassisdb" ]]; then
|
||||
update_chassisdb_config -j $db_cfg_file_tmp -k -p $chassis_db_port
|
||||
# generate all redis server supervisord configuration file
|
||||
sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
|
||||
sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/critical_processes.j2 > /etc/supervisor/critical_processes
|
||||
rm $db_cfg_file_tmp
|
||||
exec /usr/local/bin/supervisord
|
||||
exit 0
|
||||
@ -69,6 +70,7 @@ fi
|
||||
# delete chassisdb config to generate supervisord config
|
||||
update_chassisdb_config -j $db_cfg_file_tmp -d
|
||||
sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf
|
||||
sonic-cfggen -j $db_cfg_file_tmp -t /usr/share/sonic/templates/critical_processes.j2 > /etc/supervisor/critical_processes
|
||||
|
||||
if [[ "$start_chassis_db" != "1" ]] && [[ -z "$chassis_db_address" ]]; then
|
||||
cp $db_cfg_file_tmp $db_cfg_file
|
||||
|
Loading…
Reference in New Issue
Block a user