File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -248,9 +248,18 @@ function postStartAction()
248
248
# This flag will be set to "1" after DB migration/initialization is completed as part of config-setup
249
249
$SONIC_DB_CLI CONFIG_DB SET " CONFIG_DB_INITIALIZED" " 0"
250
250
else
251
+ $SONIC_DB_CLI CONFIG_DB SET " CONFIG_DB_INITIALIZED" " 0"
252
+ # this is not a first time boot to a new image. Datbase container starts w/ old pre-existing config
253
+ if [[ -x /usr/local/bin/db_migrator.py ]]; then
254
+ # Migrate the DB to the latest schema version if needed
255
+ if [ -z " $DEV " ]; then
256
+ /usr/local/bin/db_migrator.py -o migrate
257
+ fi
258
+ fi
251
259
# set CONFIG_DB_INITIALIZED to indicate end of config load and migration
252
260
$SONIC_DB_CLI CONFIG_DB SET " CONFIG_DB_INITIALIZED" " 1"
253
261
fi
262
+
254
263
# Add redis UDS to the redis group and give read/write access to the group
255
264
REDIS_SOCK=" /var/run/redis${DEV} /redis.sock"
256
265
else
You can’t perform that action at this time.
0 commit comments