Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix fast reboot compatibility #3083

Merged
merged 3 commits into from
Jun 26, 2019

Conversation

stepanblyschak
Copy link
Collaborator

@stepanblyschak stepanblyschak commented Jun 25, 2019

We should handle both cases for backward-compatible with 201803:

  • fast-reboot
  • SONIC_BOOT_TYPE=fast-reboot

Signed-off-by: Stepan Blyschak stepanb@mellanox.com

NOTE : DEPENDS on sonic-net/sonic-sairedis#480

- What I did

- How I did it

- How to verify it

Run 201803 (157th public jenkins image + #3077) -> 201811 (73th public jenkins image + this PR)

  • verified 201811 image started in fast mode
    Run 201811 (73th public jenkins image + this PR) fast reboot test
    Run 201811 (73th public jenkins image + this PR) warm reboot test

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

We should handle both cases for backward-compatible with 201803:
 - fast-reboot
 - SONIC_BOOT_TYPE=fast-reboot

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@stepanblyschak
Copy link
Collaborator Author

Retest vs please

case "$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" in
warm*)
case "$(cat /proc/cmdline)" in
*warm*)
Copy link
Collaborator

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warm [](start = 5, length = 4)

Be more specific SONIC_BOOT_TYPE=warm #Closed

TYPE='warm'
;;
fastfast)
*fastfast*)
Copy link
Collaborator

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fastfast [](start = 5, length = 8)

Be more specific SONIC_BOOT_TYPE=fastfast #Closed

TYPE='fastfast'
;;
fast*)
*fast*)
Copy link
Collaborator

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast [](start = 4, length = 6)

This one is also too general. We can match for 2 patterns:

  1. *SONIC_BOOT_TYPE=fast*
  2. *fast-reboot* #Closed

@@ -34,14 +34,14 @@ function updateHostName()
function getBootType()
{
local BOOT_TYPE
Copy link
Collaborator

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local BOOT_TYPE [](start = 4, length = 15)

This line can be removed. #Closed

@@ -55,14 +55,14 @@ function wait_for_database_service()

function getBootType()
Copy link
Collaborator

@qiluo-msft qiluo-msft Jun 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getBootType [](start = 9, length = 11)

Can we reuse the function in /usr/bin/syncd.sh? If not, make sure you share the exactly same code snippet, add code comments referring each other so we will not modify one without the other in future by mistake. #Closed

Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As comments

Stepan Blyschak added 2 commits June 26, 2019 15:31
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
two files

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
@qiluo-msft qiluo-msft merged commit 6961816 into sonic-net:master Jun 26, 2019
qiluo-msft pushed a commit to qiluo-msft/sonic-buildimage that referenced this pull request Jun 26, 2019
qiluo-msft added a commit that referenced this pull request Jun 27, 2019
…edis/201811 point (#3089)

* fix fast reboot compatibility (#3083) and advance sai-redis/201811 point
* Repoint the submodule
srideepDell added a commit to project-arlo/sonic-buildimage that referenced this pull request Jun 27, 2019
fix fast reboot compatibility (sonic-net#3083)
yxieca pushed a commit that referenced this pull request Jul 10, 2019
* fix fast reboot compatibility

We should handle both cases for backward-compatible with 201803:
 - fast-reboot
 - SONIC_BOOT_TYPE=fast-reboot

* handle review comments
* add a comment that getBootType code snippet is shared between two files
seiferteric pushed a commit to project-arlo/sonic-buildimage that referenced this pull request Oct 14, 2019
* fix fast reboot compatibility

We should handle both cases for backward-compatible with 201803:
 - fast-reboot
 - SONIC_BOOT_TYPE=fast-reboot

* handle review comments
* add a comment that getBootType code snippet is shared between two files
seiferteric pushed a commit to project-arlo/sonic-buildimage that referenced this pull request Oct 14, 2019
1. squash changes of the following commits, as a series of cherry-pick will
   cause the Change-Id checker to fail, and hence unable to push to Gerrit

   * 282180c Added S5232 led bin files missed from Azure branch
   * 94b71b3 fix fast reboot compatibility (sonic-net#3083)
   * b3a5432 Changes fix fpga driver crash Changes to support 10G EEPROM read. Changes to fix FPGA version read
   * 3d73b8d Deprecate unwanted file which is not being used
   * fe2b6b9 Fixing Z9332f lanes as broadcom SAI is fixed to return correct lanes
   * fd2b0d8 Changes to fix 10G ports for Z9264f Changes to fix show environment for Z9264f

2. revert the common code changes from '94b71b31 fix fast reboot ...'

   * files/build_templates/docker_image_ctl.j2
   * files/scripts/syncd.sh

Change-Id: I7062bad65dd1c102d411a47f94ebb952245327ff
@stepanblyschak stepanblyschak deleted the fix_fast_compat branch September 23, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants