Skip to contentSkip to conversation

Phosphor State Manager Does Not Work as Expected

DISCUSSION [email protected] 2 participants 2 messages Nov 7, 2022

lore
Share & tools
lore
#0 lore raw

Hello,

We are trying to implement phosphor-state-manager to our projects to control the host. Logs are given down below when we trigger the immediate option from GUI:

Nov 07 08:53:19 Aselsan-Server phosphor-chassis-state-manager[404]: Change
to Chassis Requested Power State:
xyz.openbmc_project.State.Chassis.Transition.Off
Nov 07 08:53:20 Aselsan-Server systemctl[415]: Job for
[email protected] canceled.
Nov 07 08:53:20 Aselsan-Server systemd[1]: [email protected]:
Main process exited, code=exited, status=1/FAILURE
Nov 07 08:53:20 Aselsan-Server systemd[1]: [email protected]:
Failed with result 'exit-code'.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Stopped Start chassis0 on after
BMC reset.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice
/system/obmc-led-group-stop.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice
/system/op-power-stop.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice
/system/op-powered-off.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice
/system/op-wait-power-off.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice
/system/phosphor-clear-one-time.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice
/system/phosphor-reset-sensor-states.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Created slice Slice
/system/phosphor-set-host-transition-to-off.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Host0 running
after reset.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Power0 (On).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Chassis0 power on
after reset.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Power0 On
(Starting).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Power0 On (Pre).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Multi-User System.
Nov 07 08:53:21 Aselsan-Server phosphor-bmc-state-manager[372]: BMC_READY
Nov 07 08:53:21 Aselsan-Server phosphor-bmc-state-manager[372]: Setting the
BMCState field to xyz.openbmc_project.State.BMC.BMCState.Ready
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Chassis0 (Reset
Check).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Host0 (Reset
Check).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Starting Wait for
/xyz/openbmc_project/control/host0/auto_reboot/one_time...
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reset host sensors was skipped
because of a failed condition check
(ConditionPathExists=!/run/openbmc/host@0-on).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Starting Set host state to
transition to off...
Nov 07 08:53:21 Aselsan-Server systemd[1]: Finished Wait for
/xyz/openbmc_project/control/host0/auto_reboot/one_time.
Nov 07 08:53:21 Aselsan-Server phosphor-host-state-manager[424]: Change to
Host State: xyz.openbmc_project.State.Host.HostState.TransitioningToOff
Nov 07 08:53:21 Aselsan-Server systemd[1]: Starting Reset one-time
properties on chassis off...
Nov 07 08:53:21 Aselsan-Server systemd[1]: Finished Set host state to
transition to off.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reached target Stop Host0 (Pre).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reached target Host0 (Stopping).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reached target Host0 (Stopped).
Nov 07 08:53:22 Aselsan-Server systemd[1]: Reached target Power0 Off (Pre).
Nov 07 08:53:22 Aselsan-Server systemd[1]: Started Stop Power0.
Nov 07 08:53:22 Aselsan-Server systemd[1]: Starting Wait for Power0 to turn
off...
Nov 07 08:53:22 Aselsan-Server systemd[1]:
[email protected]: Deactivated successfully.
Nov 07 08:53:22 Aselsan-Server systemd[1]: Finished Reset one-time

properties on chassis off.

After that, neither Chassis State nor Host State is off. The Chassis State is On and the Host State is TransitioningToOff. Could you please give us some information about what could have caused this condition?

#1 lore raw
Quoted 8 lines · On Nov 7, 2022, at 3:18 AM, [email protected] wrote:

Hello,
We are trying to implement phosphor-state-manager to our projects to control the host. Logs are given down below when we trigger the immediate option from GUI:

Nov 07 08:53:19 Aselsan-Server phosphor-chassis-state-manager[404]: Change to Chassis Requested Power State: xyz.openbmc_project.State.Chassis.Transition.Off

This looks like someone is requesting a poweroff during a power on. This fact [email protected] was running indicates the powerreset logic was running (chassis power was detected to be on after a BMC reset so the services are getting the system into the correct state to match that before the poweroff request comes in)

Quoted 38 lines
Nov 07 08:53:20 Aselsan-Server systemctl[415]: Job for [email protected] canceled.
Nov 07 08:53:20 Aselsan-Server systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Nov 07 08:53:20 Aselsan-Server systemd[1]: [email protected]: Failed with result 'exit-code'.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Stopped Start chassis0 on after BMC reset.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice /system/obmc-led-group-stop.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice /system/op-power-stop.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice /system/op-powered-off.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice /system/op-wait-power-off.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice /system/phosphor-clear-one-time.
Nov 07 08:53:20 Aselsan-Server systemd[1]: Created slice Slice /system/phosphor-reset-sensor-states.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Created slice Slice /system/phosphor-set-host-transition-to-off.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Host0 running after reset.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Power0 (On).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Chassis0 power on after reset.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Power0 On (Starting).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Power0 On (Pre).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Multi-User System.
Nov 07 08:53:21 Aselsan-Server phosphor-bmc-state-manager[372]: BMC_READY
Nov 07 08:53:21 Aselsan-Server phosphor-bmc-state-manager[372]: Setting the BMCState field to xyz.openbmc_project.State.BMC.BMCState.Ready
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Chassis0 (Reset Check).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Stopped target Host0 (Reset Check).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Starting Wait for /xyz/openbmc_project/control/host0/auto_reboot/one_time...
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reset host sensors was skipped because of a failed condition check (ConditionPathExists=!/run/openbmc/host@0-on).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Starting Set host state to transition to off...
Nov 07 08:53:21 Aselsan-Server systemd[1]: Finished Wait for /xyz/openbmc_project/control/host0/auto_reboot/one_time.
Nov 07 08:53:21 Aselsan-Server phosphor-host-state-manager[424]: Change to Host State: xyz.openbmc_project.State.Host.HostState.TransitioningToOff
Nov 07 08:53:21 Aselsan-Server systemd[1]: Starting Reset one-time properties on chassis off...
Nov 07 08:53:21 Aselsan-Server systemd[1]: Finished Set host state to transition to off.
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reached target Stop Host0 (Pre).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reached target Host0 (Stopping).
Nov 07 08:53:21 Aselsan-Server systemd[1]: Reached target Host0 (Stopped).
Nov 07 08:53:22 Aselsan-Server systemd[1]: Reached target Power0 Off (Pre).
Nov 07 08:53:22 Aselsan-Server systemd[1]: Started Stop Power0.
Nov 07 08:53:22 Aselsan-Server systemd[1]: Starting Wait for Power0 to turn off...
Nov 07 08:53:22 Aselsan-Server systemd[1]: [email protected]: Deactivated successfully.
Nov 07 08:53:22 Aselsan-Server systemd[1]: Finished Reset one-time properties on chassis off.
Quoted 1 line

After that, neither Chassis State nor Host State is off. The Chassis State is On and the Host State is TransitioningToOff. Could you please give us some information about what could have caused this condition?

PSM will mark the chassis off when the [email protected] completes and the host off when the [email protected] completes. It’s up to you to put the correct services in those targets to do the actual host shutdown and chassis power off for your system. If the states are not changing then you must have some services in those targets that are not completing.

You can do things like “systemctl —list-jobs” to try and see which one’s are hanging up. Or just go into /lib/systemd/system/ and look at the services ([email protected]/requires)