Skip to content

Commit 56c375d

Browse files
stepanblyschakqiluo-msft
authored andcommitted
fix fast reboot compatibility (sonic-net#3083) and advance sai-redis/201811 point
1 parent a6fa4d1 commit 56c375d

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

files/build_templates/docker_image_ctl.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ function getMountPoint()
77

88
function getBootType()
99
{
10-
local BOOT_TYPE
11-
case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
12-
warm*)
10+
# same code snippet in files/scripts/syncd.sh
11+
case "$(cat /proc/cmdline)" in
12+
*SONIC_BOOT_TYPE=warm*)
1313
TYPE='warm'
1414
;;
15-
fastfast)
15+
*SONIC_BOOT_TYPE=fastfast*)
1616
TYPE='fastfast'
1717
;;
18-
fast*)
18+
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
1919
TYPE='fast'
2020
;;
2121
*)

files/scripts/syncd.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ function wait_for_database_service()
5555

5656
function getBootType()
5757
{
58-
case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
59-
warm*)
58+
# same code snippet in files/build_templates/docker_image_ctl.j2
59+
case "$(cat /proc/cmdline)" in
60+
*SONIC_BOOT_TYPE=warm*)
6061
TYPE='warm'
6162
;;
62-
fastfast)
63+
*SONIC_BOOT_TYPE=fastfast*)
6364
TYPE='fastfast'
6465
;;
65-
fast*)
66+
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
6667
TYPE='fast'
6768
;;
6869
*)

src/sonic-sairedis

0 commit comments

Comments
 (0)