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

[TH3] Skipp Control Plane Assist on WARM Reboot for TH3 HWSKUs #1861

Merged
merged 5 commits into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,13 @@ function backup_database()
function setup_control_plane_assistant()
{
if [[ -n "${ASSISTANT_IP_LIST}" && -x ${ASSISTANT_SCRIPT} ]]; then
debug "Setting up control plane assistant: ${ASSISTANT_IP_LIST} ..."
${ASSISTANT_SCRIPT} -s ${ASSISTANT_IP_LIST} -m set
# TH3 HW is not capable of VxLAN programming thus skipping TH3 platforms
if [[ "${HWSKU}" != "DellEMC-Z9332f-M-O16C64" && "${HWSKU}" != "DellEMC-Z9332f-M-O16C64-lab" ]]; then
debug "Setting up control plane assistant: ${ASSISTANT_IP_LIST} ..."
${ASSISTANT_SCRIPT} -s ${ASSISTANT_IP_LIST} -m set
else
debug "${HWSKU} Not capable to support CPA. Skipping gracefully ..."
fi
elif [[ X"${STRICT}" == X"yes" ]]; then
debug "Strict mode: fail due to lack of control plane assistant ..."
exit ${EXIT_NO_CONTROL_PLANE_ASSISTANT}
Expand All @@ -288,8 +293,11 @@ function setup_control_plane_assistant()
function teardown_control_plane_assistant()
{
if [[ -n "${ASSISTANT_IP_LIST}" && -x ${ASSISTANT_SCRIPT} ]]; then
debug "Tearing down control plane assistant: ${ASSISTANT_IP_LIST} ..."
${ASSISTANT_SCRIPT} -s ${ASSISTANT_IP_LIST} -m reset
# TH3 HW is not capable of VxLAN programming thus skipping TH3 platforms
if [[ "${HWSKU}" != "DellEMC-Z9332f-M-O16C64" && "${HWSKU}" != "DellEMC-Z9332f-M-O16C64-lab" ]]; then
debug "Tearing down control plane assistant: ${ASSISTANT_IP_LIST} ..."
${ASSISTANT_SCRIPT} -s ${ASSISTANT_IP_LIST} -m reset
fi
fi
}

Expand All @@ -300,6 +308,7 @@ function is_secureboot() {
function setup_reboot_variables()
{
# Kernel and initrd image
HWSKU=$(show platform summary --json | python -c 'import sys, json; print(json.load(sys.stdin)["hwsku"])')
NEXT_SONIC_IMAGE=$(sonic-installer list | grep "Next: " | cut -d ' ' -f 2)
IMAGE_PATH="/host/image-${NEXT_SONIC_IMAGE#SONiC-OS-}"
if grep -q aboot_platform= /host/machine.conf; then
Expand Down