mapper: should it add "default interfaces" and is it valid to implement no interfaces on an object?

Patrick Williams patrick at stwcx.xyz
Thu Oct 31 05:49:23 AEDT 2024


On Wed, Oct 30, 2024 at 03:00:01PM +0800, Lei Yu wrote:
> ```
> # busctl -j call xyz.openbmc_project.ObjectMapper
> /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper
> GetObject sas /xyz/openbmc_project/software/c172a378 0
> {
>         "type" : "a{sas}",
>         "data" : [
>                 {
>                         "xyz.openbmc_project.ObjectMapper" : [
>                                 "org.freedesktop.DBus.Introspectable",
>                                 "org.freedesktop.DBus.Peer",
>                                 "org.freedesktop.DBus.Properties"
>                         ],
>                         "xyz.openbmc_project.Software.BMC.Updater" : [
>                                 "org.freedesktop.DBus.Introspectable",
>                                 "org.freedesktop.DBus.Peer",
>                                 "org.freedesktop.DBus.Properties",
>                                 "xyz.openbmc_project.Association.Definitions",
>                                 ...
>                         ]
>                 }
>         ]
> }
> ```
> 
> If we introduce the change in
> https://gerrit.openbmc.org/c/openbmc/phosphor-objmgr/+/74832, the
> above command will get this result:
> ```
> # busctl -j call xyz.openbmc_project.ObjectMapper
> /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper
> GetObject sas /xyz/openbmc_project/software/c172a378 0
> {
>         "type" : "a{sas}",
>         "data" : [
>                 {
>                         "xyz.openbmc_project.ObjectMapper" : [],
>                         "xyz.openbmc_project.Software.BMC.Updater" : [
>                                 "org.freedesktop.DBus.Introspectable",
>                                 "org.freedesktop.DBus.Peer",
>                                 "org.freedesktop.DBus.Properties",
>                                 "xyz.openbmc_project.Association.Definitions",
>                                 ...
>                         ]
>                 }
>         ]
> }
> ```
> 
> Note that it indicates that `xyz.openbmc_project.ObjectMapper` service
> implements **NO** interface on the object.

This is very strange.  I don't know why mapper would be creating
these interfaces on objects that don't exist.  It would be reasonable to
create these on the association objects, since those are actually being
created by mapper.

Why is mapper creating interfaces anywhere except where the association
itself lives?  I don't think deleting the "DefaultInterfaces" is
necessarily appropriate because those interfaces _should_ be created on
the association leaf, but elsewhere in the hierarchy they don't belong.

On my system if I introspect the `/xyz/openbmc_project/software/XXXX` in
mapper, I see only the 3 `org.freedesktop.DBus` interfaces.  If I
introspect the `/xyz/openbmc_project/software/XXXX/software_version` I
see those 3 plus an `xyz.openbmc_project.Assocation` interface.  Only
the `.../software_version` one should have the `org.freedesktop.DBus`
interfaces.

What I don't know is if this code you've changed is where those
interfaces are created (probably not).  So your change might not be
appropriate for solving the underlying issue, which is that we have
interfaces that don't belong being created on dbus independent from the
mapper response.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20241030/b06de44a/attachment.sig>


More information about the openbmc mailing list