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

[DELL] S6100 Add PowerCycle Support for Last Reset Reason #3402

Merged
merged 4 commits into from
Sep 10, 2019

Conversation

sridhar-ravindran
Copy link
Contributor

- What I did
Added support to fix power-cycle last reboot cause in S6100
Known Caveat :- If we upgrade old_image (old_image without this fix) to the new_image(with this fix)
If we do a power-cycle instead of fast/warm/cold reset, show reboot-cause will return "Unknown" instead of "power-cycle"
- How I did it
Changes Done
modified: files/image_config/process-reboot-cause/process-reboot-cause
modified: files/image_config/platform/rc.local
modified: platform/broadcom/sonic-platform-modules-dell/common/dell_pmc.c
modified: platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/chassis.py
modified: platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh
modified: platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/chassis.py

rc.local will inform the platform about first boot. Platform Init Script will use the info and update the
logical to return non-hardware in case of first time onie boot/image upgrade.

process-reboot-cause will use the first_boot notification and use it to return Valid last-reset-reason
Currently it will show unkwown which is not correct.
- How to verify it
a) power-cycle the box and issue show reboot-cause
b) Onie install the box and check return value of get_reboot_cause api
c) Upgrade the image and check return value of get_reboot_Cause api
- Description for the changelog

[DELL] S6100 Support PowerCycle in Last Reboot Reason in 201811 branch

- A picture of a cute animal (not mandatory but encouraged)

@sridhar-ravindran
Copy link
Contributor Author

@lguohan
Copy link
Collaborator

lguohan commented Sep 3, 2019

retest broadcom please

@sujinmkang
Copy link
Collaborator

sujinmkang commented Sep 4, 2019

There is a regression on S6000 with power reset. The reboot cause gets stuck and no update after all.
Please make sure if this is working on across the platform.
On S6100, for power off/on case from PDU unit, it returns "Thermal Overload:CPU". I think this is also wrong. can you please check the logic to map the power reset reason for each case too?

@sridhar-ravindran
Copy link
Contributor Author

Hi sujinmkang,
Fixed it and uploaded the UT results for S6000.
S6000 does not support powerCycle. Hence it will be Unknown for that.
Subsequent reloads will show proper results.
S6000_UT_Logs.txt

Will check again for S6100 and update

@sridhar-ravindran
Copy link
Contributor Author

sridhar-ravindran commented Sep 5, 2019

Hi @sujinmkang

I verified in S6100 using the same build.
It is working fine in my devices

After APC power-cycle
root@sonic:/home/admin# show reboot-cause
Power Loss

Could you please share the following output from your system after Power-Cycle

root@sonic:/home/admin# cat /sys/devices/platform/SMF.512/hwmon/hwmon1/smf_version
root@sonic:/home/admin# cat /sys/devices/platform/SMF.512/hwmon/hwmon1/smf_firmware_ver
root@sonic:/home/admin# cat /sys/devices/platform/SMF.512/hwmon/hwmon1/smf_reset_reason
root@sonic:/home/admin# cat /sys/devices/platform/SMF.512/hwmon/hwmon1/smf_poweron_reason
root@sonic:/home/admin# cat /sys/devices/platform/SMF.512/hwmon/hwmon1/mb_poweron_reason

P.S :- If hwmon1 is not present, please try with hwmon0

@sujinmkang
Copy link
Collaborator

Hi @sridhar-ravindran,
It seems the previous reported problems are all resolved but fast-reboot and warm-reboot on S6000 are not working with this Jenkins build.
Can you please double check if your changes on top of latest 201811 branch since those reboot works on latest build?

@sridhar-ravindran
Copy link
Contributor Author

Hi @sridhar-ravindran,
It seems the previous reported problems are all resolved but fast-reboot and warm-reboot on S6000 are not working with this Jenkins build.
Can you please double check if your changes on top of latest 201811 branch since those reboot works on latest build?

hi @sujinmkang
Synced to latest 201811 branch. FastBoot and Warmboot are working. Attached the logs.
201811_fast_warm_boot.txt

@yxieca yxieca merged commit d4758af into sonic-net:201811 Sep 10, 2019
@sridhar-ravindran sridhar-ravindran deleted the LRR_201811 branch September 10, 2019 07:08
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