Commit 40c9f06
committed
RBMC: Put Failover interface on D-Bus
Create an instance of the xyz.openbmc_project.Control.Failover interface
on the /xyz/openbmc_project/state/bmc0 path. Its 'StartFailover' method
will be used to start a failover.
If at any time a failover can't be done the method will return the
'Unavailable' D-Bus error. In this commit, that's all it does to start
with.
The interface is always on D-Bus, regardless of the BMC's role, because:
1. Failovers need to be triggered from both active and passive BMCs.
2. The FailoverInProgress property spans BMC roles. It gets set to true
while the BMC is passive and stays that way until a bit after the BMC
goes to active.
The main driver of the failover will be the passive BMC, so if called on
the active BMC the command would need to propagate to the passive BMC.
Tested:
```
$ busctl introspect xyz.openbmc_project.State.BMC.Redundancy /xyz/openbmc_project/state/bmc0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
...
xyz.openbmc_project.Control.Failover interface - - -
.StartFailover method a{sv} - -
.FailoverInProgress property b false emits-change
...
```
Call it:
```
$ busctl call xyz.openbmc_project.State.BMC.Redundancy \
/xyz/openbmc_project/state/bmc0 \
xyz.openbmc_project.Control.Failover StartFailover a{sv} 0
Call failed: The service is temporarily unavailable.
```
Change-Id: I5f9cfd83d90d10dfc22f191f3d85756aa2614af5
Signed-off-by: Matt Spinler <[email protected]>1 parent 3ee7930 commit 40c9f06
2 files changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
267 | 276 | | |
268 | 277 | | |
269 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
270 | 288 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
49 | 60 | | |
50 | 61 | | |
51 | 62 | | |
| |||
0 commit comments