Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-2065

[Dev] Create an abstraction layer for systemd related operations

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • MCO Sprint 283
    • 0

      Story

      To interact with systemd the MCD is using regular exec calls. While this can work as a short term solution, it makes maintainability, testing and separation of concerns really complicated.

      This bugfix is a good example of why maintainability is complicated when using direct calls. The fix assumed all systemctl versions implement --output=json but that's not true, it recent. On the other hand, the dbus API is very stable and can be consumed without taking care about API changes (in general).

      This story is about removing all the golang execs that call systemctl and replacing them with an interface and a default implementation that internally uses dbus.

      Acceptance Criteria

      1. All execs to systemd have disappeared and replaced by the new interface.
      2. The interface is designed in such a way mocks are easy to implement.
      3. If possible, the interface allow chain calls to dbus without opening a new session.

              rh-ee-pabrodri Pablo Rodriguez Nava
              rh-ee-pabrodri Pablo Rodriguez Nava
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: