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

[SmartSwitch] Extend reboot script for rebooting SmartSwitch #3566

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vvolam
Copy link

@vvolam vvolam commented Oct 3, 2024

What I did

Extended reboot script for SmartSwitch cases to reboot entire SmartSwitch or a specific DPU

How I did it

Implemented changes according to https://github.com/sonic-net/SONiC/blob/605c3a56ac2717dbbb638433e7bb13054fc05a31/doc/smart-switch/reboot/reboot-hld.md

How to verify it

--Pending testing on SmartSwitch--

  • Verified the script on non-smart switch and didn't find any regressions. Also script throughs errors if any new smart switch related parameters are given by user.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated
debug "User requested rebooting device ${DPU_NAME} ..."

# Retrieve DPU IP and GNMI port
dpu_ip=$(get_dpu_ip "${DPU_NAME}")

Choose a reason for hiding this comment

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

Both get_dpu_ip and get_gnmi_port do not return anything

Copy link
Author

Choose a reason for hiding this comment

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

This could be because the code might not be present for this in sonic image. I will check on the possible ETA for the changes in that case. Thank you!

Copy link
Author

Choose a reason for hiding this comment

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

@gpunathilell gnmi port changes are expected to be available by 11/15.

Choose a reason for hiding this comment

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

what I meant was the function call is not returning anything as we have no echo statements from the function(even if the gnmi ports are added manually the function doesn't return anything, and the value in dpu_ip is being overwritten with empty string)

Copy link
Author

Choose a reason for hiding this comment

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

Was the config DB set properly on the server? could you please check "sonic-db-cli CONFIG_DB HGET "DHCP_SERVER_IPV4_PORT|bridge-midplane|DPU<#>" "ips@""" is returning valid value?

scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
@vvolam vvolam changed the title Extend reboot script for rebooting SmartSwitch [SmartSwitch] Extend reboot script for rebooting SmartSwitch Nov 4, 2024
@vvolam vvolam marked this pull request as ready for review November 4, 2024 19:39
scripts/reboot_helper.py Outdated Show resolved Hide resolved
scripts/reboot_helper.py Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
scripts/reboot_helper.py Outdated Show resolved Hide resolved
scripts/reboot Outdated Show resolved Hide resolved
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