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 #1106

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

Junchao-Mellanox
Copy link
Contributor

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

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.

PRs:

PR title state context
[system-health] Led color shall be controlled by configuration when system is booting GitHub issue/pull request detail GitHub pull request check contexts

|:----------------:|:--------------------:|:-------------------------------------------------------------------------:|
| booting | ${led_color.booting} | System up time is less that 5 mins and not all services/devices are ready |
| normal | ${led_color.normal} | All services/devices are in good state |
| fault | ${led_color.fault} | Not all services/devices are in good state |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do get into fault state also when boot time is more than 5 min and not all is ok, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@liat-grozovik
Copy link
Collaborator

@zhangyanzhao I suggest to go a head with the merge. Any objection?
we would like this change to be applied to 202205 and master/202211 as it is considered as 'bug fix'

@liat-grozovik liat-grozovik merged commit ecb7c74 into sonic-net:master Nov 14, 2022
DEFAULT_LED_CONFIG = {
'fault': 'red',
'normal': 'green',
'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.

can we have some other color other than 'red' which is already used for indicating 'fault'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this PR, there is no booting stage. So, only two cases:

  1. System is all good, LED is green
  2. System is not all good, LED is red

Booting stage is introduced by this PR. So, setting "red" as the default value for booting stage is for backward compatible. User can override this value by using a system health configuration file.

@Junchao-Mellanox Junchao-Mellanox deleted the system-health-led branch November 15, 2022 01:33
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.

4 participants