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

  • Verified the script on non-smart switch and didn't find any regressions. Also, script throws errors if any new smart switch related parameters are given by user.
  • Partially verified on smart switch. Waiting for image with gnmi container running to complete testing.

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)

@vvolam vvolam force-pushed the ss-reboot branch 2 times, most recently from 460146c to c72fbc0 Compare October 3, 2024 19:36
@vvolam vvolam force-pushed the ss-reboot branch 3 times, most recently from 8746356 to d6fc624 Compare October 23, 2024 20:33
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 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
@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 Show resolved Hide resolved
@gpunathilell
Copy link
Contributor

For reboot, is it also possible to check the CONFIG_DB entry for the admin state for the DPUs? if the CONFIG_DB entry is missing or set to down, then we do not need to reboot the DPUs at all

@gpunathilell
Copy link
Contributor

General question, When we perform reboot -d DPU0 - request reboot for DPU0, do we need to exit after this call in reboot script? handle_smart_switch "$REBOOT_DPU" "$PRE_SHUTDOWN" "$DPU_MODULE_NAME" as we are requesting the reboot of a specific DPU and not requesting the reboot of NPU as well?

@vvolam
Copy link
Author

vvolam commented Dec 3, 2024

General question, When we perform reboot -d DPU0 - request reboot for DPU0, do we need to exit after this call in reboot script? handle_smart_switch "$REBOOT_DPU" "$PRE_SHUTDOWN" "$DPU_MODULE_NAME" as we are requesting the reboot of a specific DPU and not requesting the reboot of NPU as well?

@gpunathilell, Yes, this is a good catch. we should not proceed with other steps, if only a single DPU reboot is requested. Modified the code. Thank you!

utilities_common/module.py Outdated Show resolved Hide resolved
utilities_common/chassis.py Outdated Show resolved Hide resolved
utilities_common/chassis.py Outdated Show resolved Hide resolved
- Use SysLogger instead of Logger
- Fix the return type of get_num_dpus() and get_dpu_list()
@vvolam
Copy link
Author

vvolam commented Dec 12, 2024

@prgeor please help review and merge, if no other changes needed.

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.

5 participants