activation: Improve error handling in Subscribe

Handle exceptions from the sdbusplus method call_noreply API.

The Activation constructor was subscribing to systemd signals, which
would cause an "Already Subscribed" error when creating multiple
Activation instances because the bus is common.

There is no reason to subscribe to systemd signals in the constructor,
since the signals are only triggered during the activation process.
Move the Subscribe call to the activation process which calls
Unsubscribe at the end.

There's a scenario where there could still be an "Already Subscribed"
error if the activation fails, so add error handling there.

This is very similar to:
https://gerrit.openbmc-project.xyz/#/c/11428/

Tested: Code updated an image.
Change-Id: Ia35b7f2fc24c0b605692bc534c54e18742027061
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2 files changed
tree: 1f9c3383e594b9ff0d467be0ddf74e5667da2796
  1. m4/
  2. org/
  3. test/
  4. .clang-format
  5. .gitignore
  6. activation.cpp
  7. activation.hpp
  8. bootstrap.sh
  9. configure.ac
  10. generate-squashfs
  11. generate-ubi
  12. image_verify.cpp
  13. image_verify.hpp
  14. item_updater.cpp
  15. item_updater.hpp
  16. item_updater_main.cpp
  17. LICENSE
  18. MAINTAINERS
  19. Makefile.am
  20. README.md
  21. serialize.cpp
  22. serialize.hpp
  23. version.cpp
  24. version.hpp
  25. watch.cpp
  26. watch.hpp
README.md

openpower-pnor-code-mgmt

OpenPower PNOR (Processor NOR) Code Management provides a set of host software management applications for OpenPower systems. The host firmware is stored on the PNOR chip. More information can be found at Software Architecture or Host Code Update

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`.