This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/files
Vaibhav Hemant Dixit 2042f44d97
[202012] Fix fast-reboot issue where cold restart is performed due to missing FAST_REBOOT system flag (#16669)
### Why I did it

Fast reboot is failing on 202012 after PR https://github.com/sonic-net/sonic-buildimage/pull/15685 was cherrypicked to 202012 as part of https://github.com/sonic-net/sonic-buildimage/pull/16225

The master branch change is good, but the cherry pick to 202012 is bad.
Change was needed on master as the code added here was not effective (as it was unreachable) and not required (as fast-reboot on master uses warm-reboot infra of db dump and reconc).

However, this code was still being used in 202012, and should not have been removed. The DB flag needs to be set to allow services do fast recovery. In the latest 202012 images, fast reboot fails as syncd does cold restart:

Good case on 202012 (before PR 16225)
```
Sep 14 13:25:55.435266 str3-s6100-acs-6 NOTICE syncd#syncd: :- Syncd: command line:  
	EnableDiagShell=YES EnableTempView=YES DisableExitSleep=NO EnableUnittests=NO EnableConsistencyCheck=NO 
	EnableSyncMode=YES RedisCommunicationMode=redis_async EnableSaiBulkSuport=NO 
	StartType=fast               <----------------------
	ProfileMapFile=/etc/sai.d/sai.profile GlobalContext=0 ContextConfig= BreakConfig=/tmp/break_before_make_objects
```

Bad case on 202012 (after PR 16225)
```
Sep 22 22:00:19.619381 str-s6100-acs-2 NOTICE syncd#syncd: :- Syncd: command line:  
	EnableDiagShell=YES EnableTempView=YES DisableExitSleep=NO EnableUnittests=NO EnableConsistencyCheck=NO 
	EnableSyncMode=YES RedisCommunicationMode=redis_async EnableSaiBulkSuport=NO 
	StartType=cold               <----------------------
	ProfileMapFile=/etc/sai.d/sai.profile GlobalContext=0 ContextConfig= BreakConfig=/tmp/break_before_make_objects
```
##### Work item tracking
- Microsoft ADO **(number only)**: 25227065

#### How I did it

Set system flag for fast reboot during boot up path

#### How to verify it

Change restores the state as it was before PR 16225, and fast-reboot worked before 16225

Tested locally w/ the change by replacing database.sh on the device.
2023-09-25 11:11:01 -07:00
..
Aboot [Arista] Disable SSD NCQ on Lodoga (#13964) 2023-04-27 12:33:38 +08:00
apt [Build][202012] Support Debian snapshot mirror to improve build stability (#14558) 2023-04-20 22:45:33 -07:00
build/versions [ci/build]: Upgrade SONiC package versions 2023-05-10 20:50:40 +08:00
build_scripts [hostcfgd]: Add Ability To Configure Feature During Run-time (#6700) 2021-03-15 19:09:31 -07:00
build_templates [202012] Fix fast-reboot issue where cold restart is performed due to missing FAST_REBOOT system flag (#16669) 2023-09-25 11:11:01 -07:00
dhcp ZTP infrastructure changes to support DHCP discovery provisioning data (#3298) 2019-12-10 08:16:56 -08:00
docker Enabling ipv6 support on docker container network. This is needed (#5418) 2020-09-22 08:32:17 -07:00
image_config [202012] Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#16225) 2023-08-24 11:48:56 -07:00
initramfs-tools [Arista] Fix arista-net initramfs hook (#10626) 2022-04-20 10:03:37 -07:00
scripts [202012] Fix CONFIG_DB_INITIALIZED flag check logic and set/reset flag for warmboot (#16225) 2023-08-24 11:48:56 -07:00
sshd Remove SSH host keys after installing the custom version of sshd (#10633) (#11140) 2022-06-16 11:47:04 -07:00