When developing, testing and diagnosing (i.e. being logged in to the device), it is useful to be able to trigger a check if there is any update available, rather than waiting until the next update poll to happen.
Note that this functionality is only useful when running Mender in managed mode. If you are running in standalone mode then you are already able to trigger updates manually.
Because this is for managed mode, we can assume that the mender daemon is already running, and -check-update would just make the existing mender daemon it check for updates now instead of waiting until the next poll interval kicks in.
Acceptance criteria
New mender CLI option to trigger update check towards server
update check is carried out by the mender daemon already running
if there is an update available, the install and reboot carries on, just like if a poll interval was hit
Affects versions
None
Environment
None
Checklist
Activity
Show:
Patrik DahlströmDecember 23, 2020 at 5:43 PM
Edited
Maybe there's some other way to figure out the PID of the Mender daemon? Or fall back to the original version using pkill?
Ole Petter OrhagenDecember 23, 2020 at 9:21 AM
It is in fact systemd specific atm, because it is using systemctl to figure out the PID of the mender daemon. It would be nice to abstract this away actually.
If so, how would you want this done @Patrik Dahlström?
eystein.maloy.stenbergDecember 22, 2020 at 10:19 PM
I don't think there's something specific to systemd in this feature?
Maybe you're thinking of standalone mode? In this case you can use mender -install $URI.
If I misunderstood, perhaps you could correct me a bit, have you found this feature in particular (-check-update) to not work on specific systems? If you post a bit more details on what you did and what happened in this case that would help.
Patrik DahlströmDecember 22, 2020 at 8:01 PM
Any plans to make this work on systems that doesn't have systemd?
When developing, testing and diagnosing (i.e. being logged in to the device), it is useful to be able to trigger a check if there is any update available, rather than waiting until the next update poll to happen.
Note that this functionality is only useful when running Mender in managed mode. If you are running in standalone mode then you are already able to trigger updates manually.
Because this is for managed mode, we can assume that the mender daemon is already running, and -check-update would just make the existing mender daemon it check for updates now instead of waiting until the next poll interval kicks in.
Acceptance criteria
New mender CLI option to trigger update check towards server
update check is carried out by the mender daemon already running
if there is an update available, the install and reboot carries on, just like if a poll interval was hit