Skip to content

Platform plugin for Fast-reboot/warm-reboot #740

Merged
yxieca merged 2 commits intosonic-net:masterfrom
santhosh-kt:fastboot_plugin
Dec 5, 2019
Merged

Platform plugin for Fast-reboot/warm-reboot #740
yxieca merged 2 commits intosonic-net:masterfrom
santhosh-kt:fastboot_plugin

Conversation

@santhosh-kt
Copy link
Copy Markdown
Contributor

- What I did
Added support for calling a platform specific plugin in fastboot, warmboot
- How I did it
Changes applied to 'scripts/fast-reboot'
- How to verify it
Write a platform plugin script and execute fast-reboot command
Plugin script will be executed and then reboot will be invoked
- 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)

@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Nov 27, 2019

Can you give an example of how this platform plugin will be used, and why?

@Arul-Jeniston-Mc
Copy link
Copy Markdown

  • Dell hardware stores all reset/reboot reasons (including cold and warm cpu resets) in a register. This hardware register value persists till next reset/reboot occurs.
  • As the hardware doesn't have a way to detect fast-boot, following the fast-boot, hardware reset-cause register would end up having the previous reset reason value which is a stale value.
  • This plugin is added to find this situation. Otherwise, following fast-boot, the reset reason API (that reads the data from hardware) returns incorrect reset reason.

For example:-

  1. Run 1: User power-cycled the switch. .Hardware reset-cause register has value 0x11 which means power-cycle.
  2. Run 2: reboot command executed from SONiC. Hardware reset-cause register value changed to 0x55 which means warm-cpu reboot.
  3. Run 3: hardware watchdog resets the switch. Hardware reset-cause register value changed to 0x33 which means watchdog reset.
  4. Run 4: fast-boot command executed from SONiC. Hardware reset-cause register value remains un-changed as 0x33 which means watchdog reset.
  5. Run 5: show reboot reason call reset reason API which refers the hardware and returns watchdog reset. This is incorrect. The above change addresses this problem.

@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Dec 5, 2019

retest this please

@yxieca yxieca merged commit 771f468 into sonic-net:master Dec 5, 2019
@santhosh-kt santhosh-kt deleted the fastboot_plugin branch December 9, 2019 16:45
@santhosh-kt santhosh-kt restored the fastboot_plugin branch December 9, 2019 16:46
abdosi pushed a commit that referenced this pull request Jan 3, 2020
* Fastboot/warmboot platform plugin

* Added platform plugin
@santhosh-kt
Copy link
Copy Markdown
Contributor Author

Please include this change for 201811 branch also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants