diff options
author | Potin Lai <potin.lai@quantatw.com> | 2024-03-06 14:32:44 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2024-03-08 22:42:03 +0300 |
commit | 5b1b156c16e71a0ade06ae2f07efff20d9b1b19c (patch) | |
tree | fd52d21bd25f5a3b08424af34ab2cec41cc4ea7e /meta-phosphor | |
parent | e1a5cf4af5172268d3d21525d79102bc308444f1 (diff) | |
download | openbmc-5b1b156c16e71a0ade06ae2f07efff20d9b1b19c.tar.xz |
phosphor-state-manager: fix chassis poweroff calling wrong host stop
In multihost system, the OBMC_CHASSIS_INSTANCES contains "0" instance
id, which is not exist in OBMC_HOST_INSTANCES. It cause
obmc-chassis-poweroff calling wrong instance of obmc-host-stop in
multihost system.
Example of yosemite4:
- OBMC_CHASSIS_INSTANCES: 0,1,2,3,4,5,6,7,8
- OBMC_HOST_INSTANCES: 1,2,3,4,5,6,7,8
Change to use OBMC_HOST_INSTANCES for both obmc-chassis-poweroff and
obmc-host-stop.
Tested on yosemite4:
- before change, obmc-chassis-poweroff & obmc-host-stop mapping to the
different instance id.
```
root@bmc:/usr/lib/systemd/system# ls obmc-chassis-poweroff*.requires
obmc-chassis-poweroff@0.target.requires:
obmc-host-stop@1.target obmc-poweroff.service phosphor-set-chassis-transition-to-off@0.service
obmc-chassis-poweroff@1.target.requires:
obmc-host-stop@2.target phosphor-set-chassis-transition-to-off@1.service
obmc-chassis-poweroff@2.target.requires:
obmc-host-stop@3.target phosphor-set-chassis-transition-to-off@2.service
obmc-chassis-poweroff@3.target.requires:
obmc-host-stop@4.target phosphor-set-chassis-transition-to-off@3.service
obmc-chassis-poweroff@4.target.requires:
obmc-host-stop@5.target phosphor-set-chassis-transition-to-off@4.service
obmc-chassis-poweroff@5.target.requires:
obmc-host-stop@6.target phosphor-set-chassis-transition-to-off@5.service
obmc-chassis-poweroff@6.target.requires:
obmc-host-stop@7.target phosphor-set-chassis-transition-to-off@6.service
obmc-chassis-poweroff@7.target.requires:
obmc-host-stop@8.target phosphor-set-chassis-transition-to-off@7.service
obmc-chassis-poweroff@8.target.requires:
phosphor-set-chassis-transition-to-off@8.service
```
- after change, obmc-chassis-poweroff & obmc-host-stop mapping to the
same instance id.
```
root@bmc:/usr/lib/systemd/system# ls obmc-chassis-poweroff*.requires
obmc-chassis-poweroff@0.target.requires:
obmc-poweroff.service phosphor-set-chassis-transition-to-off@0.service
obmc-chassis-poweroff@1.target.requires:
obmc-host-stop@1.target phosphor-set-chassis-transition-to-off@1.service
obmc-chassis-poweroff@2.target.requires:
obmc-host-stop@2.target phosphor-set-chassis-transition-to-off@2.service
obmc-chassis-poweroff@3.target.requires:
obmc-host-stop@3.target phosphor-set-chassis-transition-to-off@3.service
obmc-chassis-poweroff@4.target.requires:
obmc-host-stop@4.target phosphor-set-chassis-transition-to-off@4.service
obmc-chassis-poweroff@5.target.requires:
obmc-host-stop@5.target phosphor-set-chassis-transition-to-off@5.service
obmc-chassis-poweroff@6.target.requires:
obmc-host-stop@6.target phosphor-set-chassis-transition-to-off@6.service
obmc-chassis-poweroff@7.target.requires:
obmc-host-stop@7.target phosphor-set-chassis-transition-to-off@7.service
obmc-chassis-poweroff@8.target.requires:
obmc-host-stop@8.target phosphor-set-chassis-transition-to-off@8.service
```
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I8aa4083f628bae84f59639966ec4c77304d36931
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb index a5ac8b585c..8407da0229 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager_git.bb @@ -244,7 +244,7 @@ STOP_TMPL_CTRL = "obmc-host-stop@.target" STOP_TGTFMT_CTRL = "obmc-chassis-poweroff@{0}.target" STOP_INSTFMT_CTRL = "obmc-host-stop@{1}.target" STOP_FMT_CTRL = "../${STOP_TMPL_CTRL}:${STOP_TGTFMT_CTRL}.requires/${STOP_INSTFMT_CTRL}" -SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'STOP_FMT_CTRL', 'OBMC_CHASSIS_INSTANCES', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK:${PN}-obmc-targets += "${@compose_list_zip(d, 'STOP_FMT_CTRL', 'OBMC_HOST_INSTANCES', 'OBMC_HOST_INSTANCES')}" # Hard power off requires chassis off HARD_OFF_TMPL_CTRL = "obmc-chassis-poweroff@.target" |