xref: /openbmc/s2600wf-misc/subprojects/callback-manager/README.md (revision 69ae808e213f2e3ce5a0fc7e805820026065064c)
1*69ae808eSJason M. Bills# Callback Manager
2*69ae808eSJason M. Bills
3*69ae808eSJason M. BillsAuthor: James Feist !jfei
4*69ae808eSJason M. Bills
5*69ae808eSJason M. BillsPrimary assignee: James Feist !jfei
6*69ae808eSJason M. Bills
7*69ae808eSJason M. BillsOther contributors: None
8*69ae808eSJason M. Bills
9*69ae808eSJason M. BillsCreated: 2019-06-26
10*69ae808eSJason M. Bills
11*69ae808eSJason M. Bills## Problem Description
12*69ae808eSJason M. Bills
13*69ae808eSJason M. BillsWe need a centralized location to change the LED state.
14*69ae808eSJason M. Bills
15*69ae808eSJason M. Bills## Background and References
16*69ae808eSJason M. Bills
17*69ae808eSJason M. Bills[Redfish Health](https://github.com/openbmc/docs/blob/master/designs/redfish_health_rollup.md)
18*69ae808eSJason M. Bills
19*69ae808eSJason M. Bills[Sensor Thresholds](https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Sensor/Threshold)
20*69ae808eSJason M. Bills
21*69ae808eSJason M. Bills## Requirements
22*69ae808eSJason M. Bills
23*69ae808eSJason M. BillsNeed to be able to trigger the LED from multiple locations and maintain state.
24*69ae808eSJason M. Bills
25*69ae808eSJason M. Bills## Proposed Design
26*69ae808eSJason M. Bills
27*69ae808eSJason M. BillsThe callback manager can change LED state in the below ways.
28*69ae808eSJason M. Bills
29*69ae808eSJason M. Bills1. Monitoring the sensor threshold interface.
30*69ae808eSJason M. Bills1. Monitoring critical / warning thresholds as Redfish does.
31*69ae808eSJason M. Bills
32*69ae808eSJason M. BillsOther interfaces specific interfaces can be added later if it makes sense. The
33*69ae808eSJason M. Billsreason it was designed this way is Redfish has the idea of a Global health
34*69ae808eSJason M. Billsstate, and a component health state. We need to map these to the LED.
35*69ae808eSJason M. Bills
36*69ae808eSJason M. Bills### Thresholds
37*69ae808eSJason M. Bills
38*69ae808eSJason M. BillsWarning thresholds will trigger warning (blink green) LED state.
39*69ae808eSJason M. Bills
40*69ae808eSJason M. BillsCritical thresholds will trigger critical (blink amber) state.
41*69ae808eSJason M. Bills
42*69ae808eSJason M. BillsCallback manager will create associations for redfish for thresholds
43*69ae808eSJason M. Billsautomatically.
44*69ae808eSJason M. Bills
45*69ae808eSJason M. Bills### Associations
46*69ae808eSJason M. Bills
47*69ae808eSJason M. BillsThere are two types of status associations, detailed in the Redfish health
48*69ae808eSJason M. Billswhitepaper.
49*69ae808eSJason M. Bills
50*69ae808eSJason M. Bills1. Global- These are the attributes to the global state (warning / critical).
51*69ae808eSJason M. Bills   This is exposed by the callback manager for ease
52*69ae808eSJason M. Bills   (xyz.openbmc_project.Inventory.Item.Global,
53*69ae808eSJason M. Bills   path=/xyz/openbmc_project/CallbackManager)
54*69ae808eSJason M. Bills1. Local- Any other warning / critical association.
55*69ae808eSJason M. Bills
56*69ae808eSJason M. BillsIf the path for an association is Critical for Global & Local, the LED will be
57*69ae808eSJason M. Billsin the fatal (amber solid) state.
58*69ae808eSJason M. Bills
59*69ae808eSJason M. BillsIf the path for an association is in Warning for Global & Critical for local,
60*69ae808eSJason M. Billsthe LED will be in the Critical (amber blink) state.
61*69ae808eSJason M. Bills
62*69ae808eSJason M. BillsIf the path for an association is in the Warning for Global & not Critical for
63*69ae808eSJason M. Billslocal, the LED will be in the Warning (blink green) state.
64*69ae808eSJason M. Bills
65*69ae808eSJason M. Bills## Alternatives Considered
66*69ae808eSJason M. Bills
67*69ae808eSJason M. BillsWrite the LED manually, this seems very error prone.
68*69ae808eSJason M. Bills
69*69ae808eSJason M. Bills## Impacts
70*69ae808eSJason M. Bills
71*69ae808eSJason M. BillsWill have to add more associations.
72*69ae808eSJason M. Bills
73*69ae808eSJason M. Bills## Testing
74*69ae808eSJason M. Bills
75*69ae808eSJason M. BillsSensor override, then look at LED and Redfish.
76