Phosphor State Manager Does Not Work as Expected

Andrew Geissler geissonator at gmail.com
Tue Nov 8 07:24:52 AEDT 2022



> On Nov 7, 2022, at 3:18 AM, zehra.ozdemir at inventron.com.tr 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 op-reset-chassis-on at 0.service 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)

> Nov 07 08:53:20 Aselsan-Server systemctl[415]: Job for obmc-chassis-poweron at 0.target canceled.
> Nov 07 08:53:20 Aselsan-Server systemd[1]: op-reset-chassis-on at 0.service: Main process exited, code=exited, status=1/FAILURE
> Nov 07 08:53:20 Aselsan-Server systemd[1]: op-reset-chassis-on at 0.service: 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 at 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]: phosphor-clear-one-time at 0.service: 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?  

PSM will mark the chassis off when the obmc-chassis-poweroff at 0.target completes and the host off when the obmc-host-stop at 0.target 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 (obmc-chassis-poweroff at 0.target.wants/requires)




More information about the openbmc mailing list