Artifact dependency not satisfied does run Download_Error state scripts

pseyfert
Fri, 27 Oct 2023 09:13:03 +0000
General Discussions

Hi

I’m working with three state scripts. Download_Enter_…, Download_Error_… and Download_Leave… to ensure that upgrade processes and software running on the device don’t interfere with each other.
(e.g. download enter: device software should stop accepting new tasks, download leave: mender client should wait here until all task queues are drained, download enter: re-enable accepting tasks.)

Now it seems to me that this does not cover all possible state transitions in and out of the download state because when sending an artifact which has some depends fields set, that are not satisfied by the currently installed artifact, I see in the journal

Oct 27 10:48:40 <redacted> mender[6266]: time="2023-10-27T10:48:40+02:00" level=info msg="State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]"
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=info msg="No public key was provided for authenticating the artifact"
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=error msg="Artifact dependency \"<redacted>\" not satisfied by currently installed artifact (<redacted>)."
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=info msg="State transition: update-store [Download_Enter] -> update-status-report [none]"
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=info msg="State transition: update-status-report [none] -> idle [Idle]"

i.e. the incoming update gets rejected on the device (nice, that’s desired), but I don’t see that either of the Download_Leave… or Download_Error scripts get executed (Download_Error would be desired in my case).

This is with mender client version

3.5.1	runtime: go1.17.13

Quickly scrolling over State scripts | Mender documentation I don’t see a documented transition other than Leave or Error to get out of the Download state.

Do you have any pointers for me to resume normal operations when an update gets rejected due to missing depends?

Thanks,
Paul

6 posts - 3 participants