[Mellanox|FFB]: Add support for Mellanox fast-fast boot in syncd#389
[Mellanox|FFB]: Add support for Mellanox fast-fast boot in syncd#389lguohan merged 5 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
|
WARNING: Word 'Mellanox' 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; |
There was a problem hiding this comment.
->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; |
syncd/syncd.cpp
Outdated
| { | ||
| options.startType = SAI_FAST_BOOT; | ||
| } | ||
| else if (std::string(optarg) == "fast-fast") |
syncd/syncd.cpp
Outdated
| } | ||
| else if (std::string(optarg) == "fast-fast") | ||
| { | ||
| options.startType = SAI_FAST_FAST_BOOT; |
|
|
||
| case "$(cat /proc/cmdline)" in | ||
| *fast-reboot*) | ||
| BOOT_TYPE="$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
since you are breaking backward compatibility, I suggest to you to change to fast and remove -reboot.
syncd/scripts/syncd_init_common.sh
Outdated
| fast-reboot) | ||
| FAST_REBOOT='yes' | ||
| ;; | ||
| fast-fast) |
| FAST_REBOOT='yes' | ||
| ;; | ||
| fast-fast) | ||
| if [ -e /var/warmboot/issu_started ]; then |
There was a problem hiding this comment.
what is this flag? why kernel cmdline is not enough?
syncd/scripts/syncd_init_common.sh
Outdated
| ;; | ||
| fast-fast) | ||
| if [ -e /var/warmboot/issu_started ]; then | ||
| FAST_FAST_REBOOT='yes' |
syncd/scripts/syncd_init_common.sh
Outdated
| ;; | ||
| *) | ||
| FAST_REBOOT='no' | ||
| FAST_FAST_REBOOT='no' |
| @@ -55,6 +63,8 @@ function set_start_type() | |||
| CMD_ARGS+=" -t warm" | |||
| elif [ $FAST_REBOOT == "yes" ]; then | |||
syncd/scripts/syncd_init_common.sh
Outdated
| CMD_ARGS+=" -t warm" | ||
| elif [ $FAST_REBOOT == "yes" ]; then | ||
| CMD_ARGS+=" -t fast" | ||
| elif [ $FAST_FAST_REBOOT == "yes" ]; then |
syncd/scripts/syncd_init_common.sh
Outdated
| elif [ $FAST_REBOOT == "yes" ]; then | ||
| CMD_ARGS+=" -t fast" | ||
| elif [ $FAST_FAST_REBOOT == "yes" ]; then | ||
| CMD_ARGS+=" -t fast-fast" |
* Change naming convention from "fast-fast" to "fastfast" Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
|
retest this please |
|
|
||
| case "$(cat /proc/cmdline)" in | ||
| *fast-reboot*) | ||
| BOOT_TYPE="$(cat /proc/cmdline | grep -o 'SONIC_BOOT_TYPE=\S*' | cut -d'=' -f2)" |
There was a problem hiding this comment.
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.
…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
…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
Signed-off-by: Stepan Blyschak stepanb@mellanox.com
Signed-off-by: Volodymyr Samotiy volodymyrs@mellanox.com