Merge pull request #7 from Azure/master
fix fast reboot compatibility (#3083)
This commit is contained in:
commit
1260d4615c
@ -33,15 +33,15 @@ function updateHostName()
|
|||||||
|
|
||||||
function getBootType()
|
function getBootType()
|
||||||
{
|
{
|
||||||
local BOOT_TYPE
|
# same code snippet in files/scripts/syncd.sh
|
||||||
case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
|
case "$(cat /proc/cmdline)" in
|
||||||
warm*)
|
*SONIC_BOOT_TYPE=warm*)
|
||||||
TYPE='warm'
|
TYPE='warm'
|
||||||
;;
|
;;
|
||||||
fastfast)
|
*SONIC_BOOT_TYPE=fastfast*)
|
||||||
TYPE='fastfast'
|
TYPE='fastfast'
|
||||||
;;
|
;;
|
||||||
fast*)
|
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
|
||||||
TYPE='fast'
|
TYPE='fast'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -167,7 +167,7 @@ start() {
|
|||||||
echo "Creating new {{docker_container_name}} container with HWSKU $HWSKU"
|
echo "Creating new {{docker_container_name}} container with HWSKU $HWSKU"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if sonic_asic_platform == "mellanox" %}
|
{%- if sonic_asic_platform == "mellanox" %}
|
||||||
# TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version
|
# TODO: Mellanox will remove the --tmpfs exception after SDK socket path changed in new SDK version
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
docker create {{docker_image_run_opt}} \
|
docker create {{docker_image_run_opt}} \
|
||||||
{%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %}
|
{%- if '--log-driver=json-file' in docker_image_run_opt or '--log-driver' not in docker_image_run_opt %}
|
||||||
|
@ -55,14 +55,15 @@ function wait_for_database_service()
|
|||||||
|
|
||||||
function getBootType()
|
function getBootType()
|
||||||
{
|
{
|
||||||
case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
|
# same code snippet in files/build_templates/docker_image_ctl.j2
|
||||||
warm*)
|
case "$(cat /proc/cmdline)" in
|
||||||
|
*SONIC_BOOT_TYPE=warm*)
|
||||||
TYPE='warm'
|
TYPE='warm'
|
||||||
;;
|
;;
|
||||||
fastfast)
|
*SONIC_BOOT_TYPE=fastfast*)
|
||||||
TYPE='fastfast'
|
TYPE='fastfast'
|
||||||
;;
|
;;
|
||||||
fast*)
|
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
|
||||||
TYPE='fast'
|
TYPE='fast'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Reference in New Issue
Block a user