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

[Mellanox] platform_reboot - sync & umount fs before power cycle #3430

Merged
merged 1 commit into from
Sep 17, 2019

Conversation

mykolaf
Copy link
Collaborator

@mykolaf mykolaf commented Sep 10, 2019

Signed-off-by: Mykola Faryma [email protected]

We noticed that null characters sometimes appear in our logs after we started using power cycle to reboot.

NOTICE admin: User requested rebooting device ...
> ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@

This gets in the way of greping the logs.

- What I did
Made sure the filesystem is synced and unmounted before performing the power cycle.
- How I did it

- How to verify it
Perform multiple reboots, then
cat -A /var/log/syslog* | grep -A 15 rebooting | grep ^@
Check that no null characters are present
- Description for the changelog

Made sure the filesystem is synced and unmounted before performing the power cycle on Mellanox platforms.

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

@@ -19,6 +19,14 @@ function ParseArguments() {
done
}

function SafePwrCycle() {
sync ; sync
umount -fa > /dev/null 2&>1
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks like a generic commands for all that does the power cycle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, Note that it's the platform reboot script, so this is only for Mellanox platforms.

@lguohan lguohan merged commit 124b26d into sonic-net:master Sep 17, 2019
@yxieca
Copy link
Contributor

yxieca commented Sep 17, 2019

@mykolaf Can you create a separate PR for 201811 branch please? This change cannot be cherry-picked cleanly. Thanks!

mykolaf added a commit to mykolaf/sonic-buildimage that referenced this pull request Sep 18, 2019
@mykolaf
Copy link
Collaborator Author

mykolaf commented Sep 18, 2019

@yxieca Created PR against 201811.

sujinmkang pushed a commit that referenced this pull request Sep 26, 2019
@mykolaf mykolaf deleted the master_pwr_cycle branch February 18, 2020 13:14
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