entity-manager unexpected handling of template parameters

Patrick Venture venture at google.com
Sat Aug 10 04:50:33 AEST 2019


On Fri, Aug 9, 2019 at 11:45 AM James Feist <james.feist at linux.intel.com> wrote:
>
> On 8/9/19 11:33 AM, Patrick Venture wrote:
> > On Fri, Aug 9, 2019 at 11:22 AM James Feist <james.feist at linux.intel.com> wrote:
> >>
> >> On 8/9/19 9:53 AM, Patrick Venture wrote:
> >>> Given the following:
> >>>
> >>> busctl introspect --no-pager xyz.openbmc_project.FruDevice
> >>> /xyz/openbmc_project/FruDevice/Altie
> >>> NAME                                TYPE      SIGNATURE RESULT/VALUE
> >>>               FLAGS
> >>> org.freedesktop.DBus.Introspectable interface -         -
> >>>               -
> >>> .Introspect                         method    -         s
> >>>               -
> >>> org.freedesktop.DBus.Peer           interface -         -
> >>>               -
> >>> .GetMachineId                       method    -         s
> >>>               -
> >>> .Ping                               method    -         -
> >>>               -
> >>> org.freedesktop.DBus.Properties     interface -         -
> >>>               -
> >>> .Get                                method    ss        v
> >>>               -
> >>> .GetAll                             method    s         a{sv}
> >>>               -
> >>> .Set                                method    ssv       -
> >>>               -
> >>> .PropertiesChanged                  signal    sa{sv}as  -
> >>>               -
> >>> xyz.openbmc_project.FruDevice       interface -         -
> >>>               -
> >>> .ADDRESS                            property  u         82
> >>>               emits-change
> >>> .BOARD_LANGUAGE_CODE                property  s         "25"
> >>>               emits-change
> >>> .BOARD_MANUFACTURER                 property  s         "Inventec"
> >>>               emits-change
> >>> .BOARD_MANUFACTURE_DATE             property  s         "Thu Jul 11
> >>> 17:09:00 2019" emits-change
> >>> .BOARD_PART_NUMBER                  property  s         "1051867-01"
> >>>               emits-change
> >>> .BOARD_PRODUCT_NAME                 property  s         "Altie"
> >>>               emits-change
> >>> .BOARD_SERIAL_NUMBER                property  s
> >>> "ALTIVT192700026"          emits-change
> >>> .BUS                                property  u         1
> >>>               emits-change
> >>> .Common_Format_Version              property  s         "1"
> >>>               emits-change
> >>>
> >>> I expected entity-manager with this profile to populate dbus properly:
> >>> configurations/altie.json
> >>> {
> >>>       "Name" : "Altie",
> >>>       "Probe" : "xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'Altie'})",
> >>>       "Type": "Board",
> >>>       "xyz.openbmc_project.Inventory.Decorator.Asset": {
> >>>           "Manufacturer": "$BOARD_MANUFACTURER",
> >>>           "Model": "$BOARD_PRODUCT_NAME",
> >>>           "PartNumber": "$BOARD_PART_NUMBER",
> >>>           "SerialNumber": "$BOARD_SERIAL_NUMBER"
> >>>       }
> >>> }
> >>>
> >>> Instead:
> >>> root at semitruck:~# busctl introspect --no-pager
> >>> xyz.openbmc_project.EntityManager
> >>> /xyz/openbmc_project/inventory/system/board/Altie
> >>> NAME                                          TYPE      SIGNATURE
> >>> RESULT/VALUE                             FLAGS
> >>> org.freedesktop.DBus.Introspectable           interface -         -
> >>>                                       -
> >>> .Introspect                                   method    -         s
> >>>                                       -
> >>> org.freedesktop.DBus.Peer                     interface -         -
> >>>                                       -
> >>> .GetMachineId                                 method    -         s
> >>>                                       -
> >>> .Ping                                         method    -         -
> >>>                                       -
> >>> org.freedesktop.DBus.Properties               interface -         -
> >>>                                       -
> >>> .Get                                          method    ss        v
> >>>                                       -
> >>> .GetAll                                       method    s
> >>> a{sv}                                    -
> >>> .Set                                          method    ssv       -
> >>>                                       -
> >>> .PropertiesChanged                            signal    sa{sv}as  -
> >>>                                       -
> >>> xyz.openbmc_project.AddObject                 interface -         -
> >>>                                       -
> >>> .AddObject                                    method    a{sv}     -
> >>>                                       -
> >>> xyz.openbmc_project.Inventory.Decorator.Asset interface -         -
> >>>                                       -
> >>> .Manufacturer                                 property  s
> >>> "$BOARD_MANUFACTURER"                    emits-change
> >>> .Model                                        property  s
> >>> "$BOARD_PRODUCT_NAME"                    emits-change
> >>> .PartNumber                                   property  s
> >>> "$BOARD_PART_NUMBER"                     emits-change
> >>> .SerialNumber                                 property  s
> >>> "$BOARD_SERIAL_NUMBER"                   emits-change
> >>> xyz.openbmc_project.Inventory.Item.Board      interface -         -
> >>>                                       -
> >>> .Name                                         property  s
> >>> "Altie"                                  emits-change
> >>> .Probe                                        property  s
> >>> "xyz.openbmc_project.FruDevice({\'BOA... emits-change
> >>> .Type                                         property  s
> >>> "Board"                                  emits-change
> >>>
> >>> I must be doing something obvious and silly.  Please advise.
> >>
> >> Entity-manager caches the result and only updates if etc/os-release
> >> changes. There is a version file in /var/configuration/version, if you
> >> delete this it'll rescan fresh. It looks right to me.. so I imagine this
> >> is what is happening.
> >
> > I deleted the /var/configuration/version file and rebooted the BMC.
> > it didn't pick it up -- I decided a rescan was too subtle :)
> >
> > Any other ideas?  I've started digging into entity-manager further.
>
> Sorry I don't see anything obvious... it should all be happening in this
> function
> https://github.com/openbmc/entity-manager/blob/b295e1d8385544f12a436ef63153d373ff8de625/src/EntityManager.cpp#L1130
>
>
> Specifically it should be making it to here:
>
> https://github.com/openbmc/entity-manager/blob/b295e1d8385544f12a436ef63153d373ff8de625/src/EntityManager.cpp#L1291

Thanks, that's where I'm now looking --

>
> foundDevice should be your fru.... and should be populated here:
>
> https://github.com/openbmc/entity-manager/blob/b295e1d8385544f12a436ef63153d373ff8de625/src/EntityManager.cpp#L425

I did not think to look here, thanks!

>
> Hope that helps
>
> -James
>
>
>
> >
> >>
> >> -James
> >>>
> >>> Thanks,
> >>> Patrick
> >>>


More information about the openbmc mailing list