@@ -223,7 +223,7 @@ function postStartAction()
223
223
# databases are not availbale until database container is ready.
224
224
# also chassisdb doesn't support warm/fast reboot, its dump.rdb is deleted
225
225
# at service startup time, nothing need to be done here.
226
- if [ " $DATABASE_TYPE " != " chassisdb" ]; then
226
+ if [[ " $DATABASE_TYPE " != " chassisdb" ] ]; then
227
227
# Wait until supervisord and redis starts. This change is needed
228
228
# because now database_config.json is jinja2 templated based
229
229
# and by the time file gets generated if we do redis ping
@@ -235,7 +235,7 @@ function postStartAction()
235
235
# database-config.json files are not ready yet, it will generate the sonic-db-cli core files.
236
236
waitForAllInstanceDatabaseConfigJsonFilesReady
237
237
until [[ ($( docker exec -i database$DEV pgrep -x -c supervisord) -gt 0) && ($( $SONIC_DB_CLI PING | grep -c PONG) -gt 0) &&
238
- ($( docker exec -i database$DEV sonic-db-cli PING | grep -c PONG) -gt 0) ]]; do
238
+ ( " $DATABASE_TYPE " == " dpudb " || $( docker exec -i database$DEV sonic-db-cli PING | grep -c PONG) -gt 0) ]]; do
239
239
sleep 1;
240
240
done
241
241
@@ -530,6 +530,9 @@ start() {
530
530
DB_OPT=$DB_OPT " -v /var/run/redis$DEV :/var/run/redis:rw "
531
531
DB_OPT=$DB_OPT " --env DATABASE_TYPE=$DATABASE_TYPE "
532
532
DB_OPT=$DB_OPT " --env NUM_DPU=$NUM_DPU "
533
+ if [[ " $DEV " ]]; then
534
+ DB_OPT=$DB_OPT " -v /var/run/redis$DEV :/var/run/redis$DEV :rw "
535
+ fi
533
536
fi
534
537
{%- endif %}
535
538
else
0 commit comments