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

[Mellanox|FFB]: Add support for Mellanox fast-fast boot in syncd #389

Merged
merged 5 commits into from
Dec 3, 2018

Conversation

volodymyrsamotiy
Copy link
Collaborator

@volodymyrsamotiy volodymyrsamotiy commented Nov 23, 2018

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

Stepan Blyschak and others added 2 commits November 23, 2018 14:30
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
@kcudnik
Copy link
Collaborator

kcudnik commented Nov 25, 2018

WARNING: Word 'Mellanox' is misspelled ../syncd/syncd.cpp
WARNING: Word 'requieres' is misspelled ../syncd/syncd.cpp

please add Mellanox to aspell dict and correct requires

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
syncd/syncd.cpp Outdated
@@ -2919,7 +2919,7 @@ void printUsage()
{
SWSS_LOG_ENTER();

std::cout << "Usage: syncd [-N] [-U] [-d] [-p profile] [-i interval] [-t [cold|warm|fast]] [-h] [-u] [-S]" << std::endl;
std::cout << "Usage: syncd [-N] [-U] [-d] [-p profile] [-i interval] [-t [cold|warm|fast|fast-fast]] [-h] [-u] [-S]" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

->fastfast. prefer not to have - here.

syncd/syncd.cpp Outdated
@@ -2929,7 +2929,7 @@ void printUsage()
std::cout << " -i --countersInterval interval" << std::endl;
std::cout << " Provide counter thread interval" << std::endl;
std::cout << " -t --startType type" << std::endl;
std::cout << " Specify cold|warm|fast start type" << std::endl;
std::cout << " Specify cold|warm|fast|fast-fast start type" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

fastfast

syncd/syncd.cpp Outdated
@@ -3028,6 +3028,10 @@ void handleCmdLine(int argc, char **argv)
{
options.startType = SAI_FAST_BOOT;
}
else if (std::string(optarg) == "fast-fast")
Copy link
Contributor

Choose a reason for hiding this comment

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

fastfast

syncd/syncd.cpp Outdated
@@ -3028,6 +3028,10 @@ void handleCmdLine(int argc, char **argv)
{
options.startType = SAI_FAST_BOOT;
}
else if (std::string(optarg) == "fast-fast")
{
options.startType = SAI_FAST_FAST_BOOT;
Copy link
Contributor

Choose a reason for hiding this comment

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

SAI_FASTFAST_BOOT

@@ -24,12 +24,20 @@ fi
# Use temporary view between init and apply
CMD_ARGS+=" -u"

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

Choose a reason for hiding this comment

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

this can cause compatibility issue. image you are on old image and want to fastfast boot into new image. We need to be aware of this issue.

BOOT_TYPE="$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)"

case "$BOOT_TYPE" in
fast-reboot)
Copy link
Contributor

Choose a reason for hiding this comment

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

since you are breaking backward compatibility, I suggest to you to change to fast and remove -reboot.

FAST_REBOOT='yes'
;;
fast-fast)
Copy link
Contributor

Choose a reason for hiding this comment

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

-> fastfast

FAST_REBOOT='yes'
;;
fast-fast)
if [ -e /var/warmboot/issu_started ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this flag? why kernel cmdline is not enough?

FAST_REBOOT='yes'
;;
fast-fast)
if [ -e /var/warmboot/issu_started ]; then
FAST_FAST_REBOOT='yes'
Copy link
Contributor

Choose a reason for hiding this comment

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

FASTFAST_BOOT

*)
FAST_REBOOT='no'
FAST_FAST_REBOOT='no'
Copy link
Contributor

Choose a reason for hiding this comment

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

FASTFAST_BOOT

@@ -55,6 +63,8 @@ function set_start_type()
CMD_ARGS+=" -t warm"
elif [ $FAST_REBOOT == "yes" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

-> FAST_BOOT

@@ -55,6 +63,8 @@ function set_start_type()
CMD_ARGS+=" -t warm"
elif [ $FAST_REBOOT == "yes" ]; then
CMD_ARGS+=" -t fast"
elif [ $FAST_FAST_REBOOT == "yes" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

FASTFAST_BOOT

@@ -55,6 +63,8 @@ function set_start_type()
CMD_ARGS+=" -t warm"
elif [ $FAST_REBOOT == "yes" ]; then
CMD_ARGS+=" -t fast"
elif [ $FAST_FAST_REBOOT == "yes" ]; then
CMD_ARGS+=" -t fast-fast"
Copy link
Contributor

Choose a reason for hiding this comment

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

fastfast

* Change naming convention from "fast-fast" to "fastfast"

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
@lguohan
Copy link
Contributor

lguohan commented Nov 30, 2018

retest this please

@volodymyrsamotiy volodymyrsamotiy changed the title [mlnx|ffb]: Add support for mellanox fast-fast boot in syncd [Mellanox|FFB]: Add support for Mellanox fast-fast boot in syncd Dec 1, 2018
@lguohan lguohan merged commit 1288f77 into sonic-net:master Dec 3, 2018
@@ -24,12 +24,20 @@ fi
# Use temporary view between init and apply
CMD_ARGS+=" -u"

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

Choose a reason for hiding this comment

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

SONIC_BOOT_TYPE= [](start = 42, length = 16)

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

fast-reboot
SONIC_BOOT_TYPE=fast-reboot
Otherwise we cannot fast-reboot from 201803 into 201811.

volodymyrsamotiy pushed a commit to volodymyrsamotiy/sonic-sairedis that referenced this pull request Jul 30, 2019
…ic-net#389)

* [mlnx|ffb] Add fast-fast boot option in syncd

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

* [mlnx|ffb]: Add support of "config end" event for mlnx fast-fast boot

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [mlnx|ffb]: Fix misspelled words for aspell check

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [Mellanox|FFB]: Fix review comments

* Change naming convention from "fast-fast" to "fastfast"

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [Mellanox|FFB]: Add misspelled word 'fastfast' to aspellcheck dictionary
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…ic-net#389)

* [mlnx|ffb] Add fast-fast boot option in syncd

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

* [mlnx|ffb]: Add support of "config end" event for mlnx fast-fast boot

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [mlnx|ffb]: Fix misspelled words for aspell check

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [Mellanox|FFB]: Fix review comments

* Change naming convention from "fast-fast" to "fastfast"

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [Mellanox|FFB]: Add misspelled word 'fastfast' to aspellcheck dictionary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants