Details
-
Type:
Task
-
Status: Done
-
Priority:
(None)
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: DBus Update flow control API
-
Sprint:MEN Sprint 135
-
Story Points:13
-
Epic Link:
-
Backlog:yes
-
Days in progress:10
Description
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)
- update_control_map (string): JSON data (exact format described in
- 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
Attachments
Release management
Issue Links
- blocks
-
MEN-4546 Sanitize Update Control Maps when calling DBus endpoint
-
- Done
-
-
MEN-4547 Implement Update Control Map expiration logic
-
- Done
-
-
MEN-4558 Use update_control_map values returned from backend in client
-
- Done
-
-
MEN-4562 When deployment has finished, remove matching update_control_maps
-
- Done
-
- is blocked by
-
MEN-4534 Implement UpdateControlMapExpirationTimeSeconds in mender.conf
-
- Done
-