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

[system-health] Led color shall be controlled by configuration when system is booting #12487

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

Junchao-Mellanox
Copy link
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Oct 25, 2022

HLD: sonic-net/SONiC#1106

Why I did it

Currently, system status LED is always red during booting stage. User cannot tell if it is a real issue or system is under initialization. This HLD change introduces a booting stage for the system health daemon and allow user to configure the system status led color for booting state.

How I did it

Led color is determined by system status and uptime.

How to verify it

Manual test

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

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

@Junchao-Mellanox Junchao-Mellanox marked this pull request as draft October 25, 2022 11:04
@liat-grozovik
Copy link
Collaborator

@qiluo-msft @prgeor could you please assign/suggest who can review this PR?

@@ -20,7 +20,7 @@ class Config(object):
DEFAULT_LED_CONFIG = {
'fault': 'red',
'normal': 'green',
'booting': 'orange_blink'
'booting': 'red'
Copy link
Contributor

Choose a reason for hiding this comment

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

why changed from 'orange' blinking to 'red'? How to distinguish between fault state or system hung stat during boot?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for backward compatible. Before this change, booting stage is not used, so "orange_blink" is not used too, system led color is always red during system booting time because not all services are ready. In the new change, I set "booting stage" to red to make sure backward compatible: if user does not provide system health configuration file, system led color will be red which is the same behavior as before; otherwise, system led will be set to the color specified in system health configuration file.

@liat-grozovik liat-grozovik requested review from prgeor and removed request for lguohan and qiluo-msft November 14, 2022 19:46
@liat-grozovik
Copy link
Collaborator

@prgeor kindly reminder. we need this fix in 202211 and 202205. Lets please close the review feedback

@prgeor prgeor self-assigned this Dec 1, 2022
@prgeor prgeor merged commit ffa974c into sonic-net:master Dec 1, 2022
@Junchao-Mellanox Junchao-Mellanox deleted the system-led branch December 1, 2022 02:47
@Junchao-Mellanox
Copy link
Collaborator Author

Hi @yxieca , could you please help cherry-pick to 202205?

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Dec 1, 2022
…ystem is booting (sonic-net#12487)

* [system-health] Led color shall be controlled by configuration when system is booting

* Fix unit test issue
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202205: #12909

yxieca pushed a commit that referenced this pull request Dec 8, 2022
…ystem is booting (#12487)

* [system-health] Led color shall be controlled by configuration when system is booting

* Fix unit test issue
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.

6 participants