sonic-buildimage/files/image_config
Vaibhav Hemant Dixit 6e705dddb0 Fix for fast/cold-boot: call db_migrator only after old config is loaded (#14933)
Why I did it
Fix the issue where db_migrator is called before DB is loaded w/ config. This leads to db_migrator:

Not finding anything, and resumes to incorrectly migrate every missing config
This is not expected. migration should happen after the old config is loaded and only new schema changes need migration.
Since DB does not have anything when migrator is called, db_migrator fails when some APIs return None.
The reason for incorrect call is that:

database service starts db_migrator as part of startup sequence.
config-setup service loads data from old-config/minigraph. However, since it has Requires=database.service.
Hence, config-setup starts only when database service is started. And database service is started when db_migrator is completed.
Fixed by:

Check if this is first time boot by checking pending_config_migration flag.
If pending_config_migration is enabled, then do not call db_migrator as part of database service startup.
Let database service start which triggers config-setup service to start.
Now call db_migrator after when config-setup service loads old-config/minigraph
2023-06-02 18:25:16 +00:00
..
backend_acl [storage_backend] Add backend acl service (#14229) 2023-03-20 20:25:21 +00:00
bash Close console session due to user inactivity (#9890) 2022-02-08 19:07:29 +00:00
config-chassisdb [ChassisDB]: bring up ChassisDB service (#5283) 2020-10-14 15:15:24 -07:00
config-setup Fix for fast/cold-boot: call db_migrator only after old config is loaded (#14933) 2023-06-02 18:25:16 +00:00
constants [bgpcfgd]: Fixes for BBR (#5956) 2020-11-19 00:07:58 -08:00
copp [202012][copp_cfg] Enable dhcp trap for BmcMgmtToRRouter (#10596) 2022-04-19 15:59:20 +08:00
corefile_uploader [Python] Align files in root dir, dockers/ and files/ with PEP8 standards (#6109) 2020-12-03 15:57:50 -08:00
cron.d [core_cleanup] Fix issue where core_cleanup job runs too frequently (#3659) 2019-10-23 15:55:47 -07:00
ebtables [ebtbles] Replace binary config file to text config file for ebtables (#5252) 2020-09-03 17:27:07 -07:00
environment [202012] Change submodule path from Azure to sonic-net (#12312) 2022-10-13 23:30:37 +08:00
fstrim [202012][fstrim] delay fstrim timer after sonic.target (#8737) 2021-09-14 08:59:17 +00:00
haveged Start haveged before systemd-random-seed (#10328) 2022-03-24 14:28:42 -07:00
hostname Fix to improve hostname handling (#12064) 2022-10-26 05:48:16 +00:00
interfaces Fix race condition between networking service and interface-config service (#10573) (#10766) 2022-05-14 14:58:24 -07:00
kdump [kdump] Fix kdump error message when a reboot is issued (#7985) 2021-07-07 09:40:16 +00:00
kubernetes [baseimage]: Install Kubernetes packages if enabled in image (#4374) 2020-04-13 08:41:18 -07:00
logrotate [Arista] Remove arista.log from rsyslog default logrotate (#9731) 2022-04-28 23:58:41 +00:00
misc [Python] Align files in root dir, dockers/ and files/ with PEP8 standards (#6109) 2020-12-03 15:57:50 -08:00
monit [memory_checker] Do not check memory usage of containers if docker daemon is not running (#11476) 2022-07-27 23:28:19 +00:00
ntp [ntp] Fix ntp.conf template to allow setting of source port in CONFIG_DB (#7586) 2021-05-27 22:29:01 +00:00
pcie-check Support multiple pcie configuration file and change the pcie status table name to match with pcied changes (#7886) 2021-06-17 07:09:50 +00:00
platform [Bug] Fix SONiC installation failure caused by pip/pip3 not found (#13284) 2023-01-12 23:31:08 +00:00
resolv-config [202012] Clear /etc/resolv.conf before building image (#12686) 2022-11-15 10:09:09 +08:00
rsyslog [services] introduce sonic.target (#5705) 2021-03-04 21:23:05 +00:00
secureboot [port_config] Introduce ad-hoc mport_config.json file (#8066) 2021-07-15 12:06:47 +00:00
snmp mvrf_avoid_snmp_yml_config: made changes to pass SNMP config from con… (#4057) 2020-01-28 17:41:21 -08:00
sudoers Improve sudo cat command for RO user. (#14428) 2023-03-30 00:10:07 +00:00
sysctl Set sock rx Buf size to 3MB. (#5566) 2020-10-15 14:40:59 -07:00
syslog [baseimage]: /host unmount timeout issue during reboot. (#5032) 2020-07-25 01:27:58 -07:00
system-health [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
systemd [systemd] disable default systemd udev rules for interfaces (#7369) 2021-05-01 19:43:41 -07:00
topology [platform] Add Support For Environment Variable File (#5010) 2020-07-31 17:59:09 -07:00
updategraph [platform] Add Support For Environment Variable File (#5010) 2020-07-31 17:59:09 -07:00
warmboot-finalizer Update WARM START FINALIZER to wait for linkmgrd to reconcile (#11477) 2022-08-09 21:05:12 +00:00
watchdog-control [sonic-utilities] Build and install as a Python wheel package (#5409) 2020-09-20 20:16:42 -07:00
sonic_release [build]: add sonic_release 202012 2021-08-07 18:04:28 -07:00