ObjectMapper & Redfish Update Service: Software.Activation Missing (SW Version Mgmt & Image Update)

Giles, Joshua Joshua.Giles at dell.com
Wed Mar 10 02:01:35 AEDT 2021


Hello all,

Problem:
My colleague Balaji Rao and I are looking at Redfish + Item Updater implementation and found some unexpected (I'm a newbie) behavior coming from processes involved.
In particular, there is some discrepancy/disagreement around the ObjectMapper.GetObject versus introspection of the /software/<id> interfaces...

Interfaces missing
===============
AFAICT, RF update_service.cpp has a thread that monitors and cycles through the interfaces of the object in question /xyz/openbmc_project/software/<id> and when it finds the “…Software.Activation” interface, it will activate the image by setting the RequestedActivation property to “Active.”

This framework works fine for BMC updates but I see that for our BIOS/Host updates RF only finds some interfaces then completes (exit out of image_manager_main.cpp); RF thread times out (10min) without finding the Software.Activation interface.

Help Wanted
===========
Not until the object mapper service is restarted do I see the expected interfaces populate.
Looking for some guidance on this RF<->ObjectMapper relationship, known problems with OM or different ways of searching for these interfaces.
Repro observation Steps 1-5 below...

Steps
====
1.) Given an upload of a host update package we see the object in the appropriate updater and version services:
# busctl tree xyz.openbmc_project.Software.BIOS.Updater
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/software
      `-/xyz/openbmc_project/software/f14f2d15
# busctl tree xyz.openbmc_project.Software.Version
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/software
      `-/xyz/openbmc_project/software/f14f2d15


2.) introspection should show us the "Software.Activation" interface and does: 
# busctl introspect xyz.openbmc_project.Software.BIOS.Updater /xyz/openbmc_project/software/f14f2d15
NAME                                        TYPE      SIGNATURE RESULT/VALUE                             FLAGS
org.freedesktop.DBus.Introspectable         interface -         -                                        -
.Introspect                                 method    -         s                                        -
...
[snip]
xyz.openbmc_project.Software.Activation     interface -         -                                        -
.Activation                                 property  s         "xyz.openbmc_project.Software.Activat... emits-change writable
.RequestedActivation                        property  s         "xyz.openbmc_project.Software.Activat... emits-change writable
 [/snip]

3.) However GetObject does not show this interface and _looks_ incomplete (only 1 dictionary) when compared to the bmc equivalent (2 dictionaries)...not sure how this works or what it means though...
# dbus-send --system --print-reply --dest=xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper.GetObject string:"/xyz/openbmc_project/software/f14f2d15" array:string:
method return time=1614957915.326031 sender=:1.27 -> destination=:1.848 serial=5187 reply_serial=2
   array [
      dict entry(
         string "xyz.openbmc_project.Software.Version"
         array [
            string "org.freedesktop.DBus.Introspectable"
            string "org.freedesktop.DBus.Peer"
            string "org.freedesktop.DBus.Properties"
            string "xyz.openbmc_project.Common.FilePath"
            string "xyz.openbmc_project.Object.Delete"
            string "xyz.openbmc_project.Software.Version"
         ]
      )
   ]

4.) get-mapper shows Software.Version to be the service associated with this object
#mapper get-service /xyz/openbmc_project/software/f14f2d15
xyz.openbmc_project.Software.Version

5.) However, restarting OM appears to populate the missing interfaces/dictionaries...what gives? 
#systemctl restart xyz.openbmc_project.ObjectMapper
#dbus-send --system --print-reply --dest=xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper.GetObject string:"/xyz/openbmc_project/software/f14f2d15" array:string: 
method return time=1615231533.859479 sender=:1.4498 -> destination=:1.4517 serial=1287 reply_serial=2
   array [
      dict entry(
         string "xyz.openbmc_project.Software.BIOS.Updater"
         array [
            string "org.freedesktop.DBus.Introspectable"
            string "org.freedesktop.DBus.Peer"
            string "org.freedesktop.DBus.Properties"
            string "xyz.openbmc_project.Association.Definitions"
            string "xyz.openbmc_project.Common.FilePath"
            string "xyz.openbmc_project.Object.Delete"
            string "xyz.openbmc_project.Software.Activation"
            string "xyz.openbmc_project.Software.Version"
         ]
      )
      dict entry(
         string "xyz.openbmc_project.Software.Version"
         array [
            string "org.freedesktop.DBus.Introspectable"
            string "org.freedesktop.DBus.Peer"
            string "org.freedesktop.DBus.Properties"
            string "xyz.openbmc_project.Common.FilePath"
            string "xyz.openbmc_project.Object.Delete"
            string "xyz.openbmc_project.Software.Version"
         ]
      )
   ]

References
=========
https://github.com/openbmc/docs/blob/master/architecture/object-mapper.md
https://github.com/openbmc/docs/blob/master/architecture/code-update/code-update.md
https://github.com/openbmc/phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Software

-Josh Giles



More information about the openbmc mailing list