mapper: Keep track of association owners

It is possible that an association object can be sourced from
multiple D-Bus services and paths, and the existing code did
not take that into account when removing assocations on
interfacesRemoved signals, which caused it to overzealously
remove association objects.

For example, both objects /path/A and /path/B can have an
org.openbmc.Associations property value such that the mapper
creates a /path/C association object.  Then, when /path/A
is removed from D-Bus, the /path/C association object should
still be kept until /path/B is also gone.

The code accomplishes this be creating a new map of association
metadata called associationOwners that keeps track of
associations based on the service and path of the object that
owns the org.openbmc.Associations object.  Now, when the
interfacesRemoved signal comes in for that
org.openbmc.Associations object, the code knows if there are
other owners of an association which determine if the mapper
owned association object can be removed from D-Bus or not.

Change-Id: If483e2ecd1d832b6287c2cbd67c5d23143f9ce32
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed
tree: 829fcbf468d0eaff59306b4c565d07e5766e0f13
  1. fail-monitor/
  2. libmapper/
  3. obmc/
  4. src/
  5. .clang-format
  6. .gitignore
  7. bootstrap.sh
  8. configure.ac
  9. LICENSE
  10. MAINTAINERS
  11. Makefile.am
  12. phosphor-mapper
  13. README.md
  14. setup.cfg
  15. setup.py.in
README.md

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.