-
Notifications
You must be signed in to change notification settings - Fork 273
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
Changes from 4 commits
9ed8451
7d8114a
a2bb751
3f1433f
99d8c38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We should handle both cases for backward-compatible with 201803: fast-reboot |
||
|
||
case "$BOOT_TYPE" in | ||
fast-reboot) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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' | ||
;; | ||
fastfast) | ||
if [ -e /var/warmboot/issu_started ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this flag? why kernel cmdline is not enough? |
||
FASTFAST_REBOOT='yes' | ||
fi | ||
;; | ||
*) | ||
FAST_REBOOT='no' | ||
FASTFAST_REBOOT='no' | ||
;; | ||
esac | ||
|
||
|
@@ -55,6 +63,8 @@ function set_start_type() | |
CMD_ARGS+=" -t warm" | ||
elif [ $FAST_REBOOT == "yes" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -> FAST_BOOT |
||
CMD_ARGS+=" -t fast" | ||
elif [ $FASTFAST_REBOOT == "yes" ]; then | ||
CMD_ARGS+=" -t fastfast" | ||
fi | ||
} | ||
|
||
|
@@ -87,6 +97,7 @@ config_syncd_mlnx() | |
# Write MAC address into /tmp/profile file. | ||
cat $HWSKU_DIR/sai.profile > /tmp/sai.profile | ||
echo "DEVICE_MAC_ADDRESS=$ALIGNED_MAC_ADDRESS" >> /tmp/sai.profile | ||
echo "SAI_WARM_BOOT_WRITE_FILE=/var/warmboot/" >> /tmp/sai.profile | ||
} | ||
|
||
config_syncd_centec() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,6 +99,7 @@ LOOPBACK | |
lua | ||
MCAST | ||
md | ||
Mellanox | ||
metadata | ||
mlnx | ||
mpls | ||
|
There was a problem hiding this comment.
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.