Server Power On mystery

Ed Tanous ed at tanous.net
Tue Aug 25 04:41:14 AEST 2020


I think the best thing would be to start off by stating exactly what
you're trying to accomplish, and we can go from there.  As is, you're
using a raspberry pi, which doesn't have a "host" in the normal BMC
sense, so I'm really confused as to what you're hoping to do with the
host power button.  Are you trying to reboot the raspberry pi?  Reboot
a host connected through some other means?

-Ed

On Fri, Aug 21, 2020 at 3:29 PM Mike Jones <proclivis at gmail.com> wrote:
>
> Hi,
>
> I am trying to understand how the Server power button in the webui works.
>
> As before, using raspberry pi, and I’ll leave project links at the end for anyone that wants to use them. Things work up to monitoring voltages. Note the conf project has a phosphor branch for the full monty.
>
> To reverse engineer, I setup: dbus-monitor —system > someFile.log
>
> There is a message for systemd1.Manager; member=StartUnit and best I can tell, somehow this gets routed to systemd to start some service or run some exe. I see this mentioned in the dbus transactions:
>
> "obmc-host-start at 0.target>
> And that is in /lib/systemd/system and depends on obmc-host-startmin at 0.target, but that does not depend on any service. So that is a dead end. It also depends on a reboot attempts, but I think that is not responsible for power on/off.
>
> Then there are chassis services, but I cannot find a link from obmc-host-start at 0.target to objc-chassis-poweron at 0.target.
>
> In this doc: https://github.com/openbmc/docs/blob/master/architecture/openbmc-systemd.md
>
> It shows:
>
>
> ls -1 /lib/systemd/system/obmc-chassis-poweron\@0.target.requires/
> op-power-start at 0.service
> op-wait-power-on at 0.service
>
>
> But when I “ls” that path, the above dependencies are not there. There is only a dependency on phosphor-fan-presence-tach at 0.service
>
> There is some state service that lead to things with xzy paths, and I eventually found /run/systemd/units. These have file names starting with “invocation” in the names and link to GUID like nodes that don’t “cat” like a normal file. So I am not sure how those work. Is there some kernel driver that works like sysfs so that these nodes are not traditional files?
>
> What I am trying to understand is two things:
>
> - Interaction with the power regulator
> - Interaction with the host cpu
>
> So my hope is someone can connect the dots of the path from the dbus to systemd through the targets to a service executable doing the work so I can try to replace them with:
>
> - Something that turns the regulators on/off, with pmbus in this case.
> - Something that can behave like a host to keep the system happy like a real system.
>
> Mike
>
> My repos
> ——————
>
> https://github.com/Proclivis/meta-pmbus-raspberrypi.git
> https://github.com/Proclivis/meta-pmbus-phosphor.git
> https://github.com/Proclivis/conf-openbmc-adi.git
>
> The monitor messages for StartUnit
> ———
>
> method call time=1598039669.247458 sender=:1.48 -> destination=org.freedesktop.systemd1 serial=33 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=StartUnit
>    string "obmc-host-start at 0.target"
>    string "replace"
> method call time=1598039669.276170 sender=:1.3 -> destination=org.freedesktop.DBus serial=775 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetConnectionUnixUser
>    string ":1.48"
> method return time=1598039669.276234 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 reply_serial=775
>    uint32 0
> method call time=1598039669.280376 sender=:1.3 -> destination=org.freedesktop.DBus serial=776 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
>    string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0=':1.48'"
> method return time=1598039669.280661 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 reply_serial=776
> method call time=1598039669.280701 sender=:1.3 -> destination=org.freedesktop.DBus serial=777 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
>    string ":1.48"
> method return time=1598039669.280738 sender=org.freedesktop.DBus -> destination=:1.3 serial=4294967295 reply_serial=777
>    string ":1.48"
> signal time=1598039669.280774 sender=:1.3 -> destination=(null destination) serial=778 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=UnitNew
>    string "obmc-host-start at 0.target"
>    object path "/org/freedesktop/systemd1/unit/obmc_2dhost_2dstart_400_2etarget"
> signal time=1598039669.280823 sender=:1.3 -> destination=(null destination) serial=779 path=/org/freedesktop/systemd1; interface=org.freedesktop.systemd1.Manager; member=JobNew
>    uint32 1105
>    object path "/org/freedesktop/systemd1/job/1105"
>    string "obmc-host-start at 0.target"
> method return time=1598039669.280883 sender=:1.3 -> destination=:1.48 serial=780 reply_serial=33
>    object path "/org/freedesktop/systemd1/job/1105"
> signal time=1598039669.281305 sender=:1.48 -> destination=(null destination) serial=34 path=/xyz/openbmc_project/state/host0; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
>    string "xyz.openbmc_project.State.Host"
>    array [
>       dict entry(
>          string "RequestedHostTransition"
>          variant             string "xyz.openbmc_project.State.Host.Transition.On"
>       )
>    ]
>    array [
>    ]


More information about the openbmc mailing list