Skip to content

Commit

Permalink
[system-health] Led color shall be controlled by configuration when s…
Browse files Browse the repository at this point in the history
…ystem is booting (#1106)

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.
  • Loading branch information
Junchao-Mellanox authored Nov 14, 2022
1 parent 42a9067 commit ecb7c74
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions doc/system_health_monitoring/system-health-HLD.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ The configuration shall be:
}
```

### 1.5 system status LED color definition
### 1.5 System status LED color definition

default system status LED color definition is like
System status LED is set based on the status of system. The system status is defined as following

| Status | Led Color | Description |
|:----------------:|:--------------------:|:-------------------------------------------------------------------------:|
| 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 |

| Color | Status | Description |
|:----------------:|:-------------:|:-----------------------:|
| Off | off | no power |
| Blinking amber | boot up | switch is booting up |
| Red | fault | in fault status |
| Green | Normal | in normal status |

Considering that different vendors platform may have different LED color capability, so LED color for different status also configurable:

Expand All @@ -148,8 +148,15 @@ Considering that different vendors platform may have different LED color capabil
}
```

The field "booting" is deprecated because there is no booting stage anymore. For backward compatible, user can still configure this field but it won't take effect.
If not configuration is provided, default configuration is used:

```python
DEFAULT_LED_CONFIG = {
'fault': 'red',
'normal': 'green',
'booting': 'red'
}
```

## 2. System health monitor service business logic

Expand Down

0 comments on commit ecb7c74

Please sign in to comment.