Skip to content

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

Merged
lguohan merged 5 commits intosonic-net:masterfrom
volodymyrsamotiy:mlnx-ffb
Dec 3, 2018
Merged

[Mellanox|FFB]: Add support for Mellanox fast-fast boot in syncd#389
lguohan merged 5 commits intosonic-net:masterfrom
volodymyrsamotiy:mlnx-ffb

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
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
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
{
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
}
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


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)
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-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

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

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

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