- Implement UpdateControlMapBootExpirationTimeSeconds in mender.conf, which takes an integer (seconds). If unset, it defaults to ten minutes.
- Upon each update of the Update Control Maps, save the entire set in LMDB.
- Key name: update-control-maps
- Upon startup, load the Update Control Maps from LMDB.
- While loading, set the time of each map so that maximum UpdateControlMapBootExpirationTimeSeconds remains.
- Unit tests which tests various combinations of saving and loading.
- Feature branch: feature-dbus_update_control
The intention of this feature is to avoid race conditions where the client is started, but callers of the DBus API do not have time to instate pause maps before the client has already started an update. This gives a window where they can call the endpoints, while still allowing the map to expire reasonably fast if they are not present anymore.
The reason we do not simply rely on UpdateControlMapExpirationTimeSeconds is that it will often be set very high, perhaps several days. If we relied solely on that, it would be very difficult for a map to expire reliably if the device is rebooted somewhat frequently, because the expiration time would always restart.