File tree 2 files changed +4
-25
lines changed
image_config/config-setup
2 files changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -246,18 +246,10 @@ function postStartAction()
246
246
$SONIC_DB_CLI CONFIG_DB SET " CONFIG_DB_INITIALIZED" " 1"
247
247
fi
248
248
249
- if [ -e /tmp/pending_config_migration ]; then
250
- # this is first boot to a new image, config-setup execution is pending.
251
- # For fast/cold reboot case, DB contains nothing at this point
252
- # Call db_migrator after config-setup loads the config (from old config or minigraph)
253
- echo " Delaying db_migrator until config migration is over"
254
- else
255
- # this is not a first time boot to a new image. Datbase container starts w/ old pre-existing config
256
- if [[ -x /usr/local/bin/db_migrator.py ]]; then
257
- # Migrate the DB to the latest schema version if needed
258
- if [ -z " $DEV " ]; then
259
- /usr/local/bin/db_migrator.py -o migrate
260
- fi
249
+ if [[ -x /usr/local/bin/db_migrator.py ]]; then
250
+ # Migrate the DB to the latest schema version if needed
251
+ if [ -z " $DEV " ]; then
252
+ /usr/local/bin/db_migrator.py -o migrate
261
253
fi
262
254
fi
263
255
# Add redis UDS to the redis group and give read/write access to the group
Original file line number Diff line number Diff line change @@ -304,16 +304,6 @@ check_all_config_db_present()
304
304
return 0
305
305
}
306
306
307
- # DB schema is subject to change between two images
308
- # Perform DB schema migration after loading backup config from previous image
309
- do_db_migration ()
310
- {
311
- if [[ -x /usr/local/bin/db_migrator.py ]]; then
312
- # Migrate the DB to the latest schema version if needed
313
- /usr/local/bin/db_migrator.py -o migrate
314
- fi
315
- }
316
-
317
307
# Perform configuration migration from backup copy.
318
308
# - This step is performed when a new image is installed and SONiC switch boots into it
319
309
do_config_migration ()
@@ -336,19 +326,16 @@ do_config_migration()
336
326
if [ x" ${WARM_BOOT} " == x" true" ]; then
337
327
echo " Warm reboot detected..."
338
328
disable_updategraph
339
- do_db_migration
340
329
rm -f /tmp/pending_config_migration
341
330
exit 0
342
331
elif check_all_config_db_present; then
343
332
echo " Use config_db.json from old system..."
344
333
reload_configdb
345
- do_db_migration
346
334
# Disable updategraph
347
335
disable_updategraph
348
336
elif [ -r ${MINGRAPH_FILE} ]; then
349
337
echo " Use minigraph.xml from old system..."
350
338
reload_minigraph
351
- do_db_migration
352
339
# Disable updategraph
353
340
disable_updategraph
354
341
else
You can’t perform that action at this time.
0 commit comments