Good time of the day.
I have been working on Mender integration within the system I have on my end and came to a bit of a roadblock with mender-configure
addon.
I found mender-configure
addon to be quite useful for setting per-device timezones and hostnames (possibly, more things will be set later). Hence, I would like to keep the addon. However, it does seem to have some limitations. Let me elaborate.
Current system design:
dir
update module is being used to release application-level updates.rootfs
update module is being used to release system-level updates.mender-configure
addon is being used to set hostname and timezones per-device.
Note: App is packed inside rootfs
updates whenever a rootfs
update is released.
Current boot up flow:
- RPi boots up
- Custom application boots up and goes into idle mode for 3 minutes. This allows mender-client to check for an update
- In case update is available,
Download_Enter
rootfs state script sends a command to an application to be terminated. In case no update is available, application times out within 3 minutes and starts executing regular flow.
Because of aforementioned app termination in case of update availability, an application boot up must happen some time:
- In terms of
rootfs
updates, system reboot will happen anyway to switch between A/B partitions. This will be sufficient to kickstart the bootup of a new app. (keeping in mind that new app is packed withinrootfs
update) - In case of
dir
update, no system reboot will happen butArtifactCommit_Leave
andArtifactFailure_Leave
state scripts will handle an application bootup. - In case of
mender-configure
update, there is no clear way of kickstarting an application.
So far, I think these are some possibilities:
- Improve logic of
Download_Enter
state script by checking what type of deployment is pending. But for this, an ability to read deployment info is required. Is it possible to read deployment info frommender-client
? - Attach a state script to
mender-configure
generated artifacts (to make it look similar todir
). However this note makes me thing this might be impossible. Is it possible to interact with the waymender-configure
generates the artifacts on the backend? - Move
ArtifactCommit_Leave
andArtifactFailure_Leave
state scripts away from the artifacts and put them underrootfs
. Will they even be run in such a case?
I am looking forward to any ideas at this stage.