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

Rao, Balaji B Balaji.B.Rao at dell.com
Wed Mar 10 03:23:44 AEDT 2021


Hi Josh,

I synced up with Ed and Matt on Discord and found that the issue was with the ObjectManager Interface not being added. Thanks to Ed and Matt for suggesting the fix. I'll try adding the ObjectManager Interface. I'll reach back if I find an issue. Thanks for the help.

Thanks,

Balaji Rao
Distinguished Member Technical Staff
Dell EMC | Firmware Engineering
+1-512-728-2971 / Balaji.B.Rao at Dell.com

-----Original Message-----
From: Giles, Joshua <Joshua_Giles at Dell.com> 
Sent: Tuesday, March 9, 2021 9:02 AM
To: Ed Tanous
Cc: Rao, Balaji B; Brad Bishop; openbmc; Ed Tanous; Gunnar Mills
Subject: ObjectMapper & Redfish Update Service: Software.Activation Missing (SW Version Mgmt & Image Update)

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