Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-4535

Implement Go routine which serves UpdateControlMap DBus endpoint




      Acceptance criteria:

      • Implement a new DBus endpoint:
        • Connection name: io.mender.UpdateManager
        • Object path: /io/mender/UpdateManager
        • Interface: io.mender.Update1
        • Method name: SetUpdateControlMap
        • Parameters:
          • update_control_map (string): JSON data (exact format described in MEN-4546, but assume it has id and priority keys)
        • Returns:
          • refresh_timeout (int): Seconds before the request should be refreshed. This should be UpdateControlMapExpirationTimeSeconds / 2.
      • Endpoint must be served from a new Go routine separate from the main thread. This is to keep responsiveness even during an update.
        • Do not reuse the Auth Go routine, we may split this into a separate binary later, so the code should not be mixed.
      • The id and priority fields together form the primary key for the map. All maps with unique keys are stored, but identical keys overwrite each other. For example:
        [id: 123456, priority: 0] + [id: abcdef, priority: 0] = store both
        [id: 123456, priority: 0] + [id: abcdef, priority: 1] = store both
        [id: 123456, priority: 0] + [id: 123456, priority: 1] = store both
        [id: 123456, priority: 0] + [id: 123456, priority: 0] = overwrite
      • All accesses to read and write the maps must be thread safe (mutex probably).
      • The client facing API should be SetMapValue (or similar name)
      • Unit tests
      • Feature branch: feature-dbus_update_control


          Issue Links



              • Assignee:
                oleorhagen Ole Petter Orhagen
                a10040 Kristian Amlie
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:

                  Summary Panel