# Download State Timeout does not report as failure

**URL:** <https://hub.mender.io/t/download-state-timeout-does-not-report-as-failure/4021>\
**Category:** Other\
**Tags:** yocto, state-scripts, dunfell\
**Created:** [August 19, 2021, 9:55pm UTC](https://hub.mender.io/t/download-state-timeout-does-not-report-as-failure/4021 "2021-08-19T21:55:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SegFault](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/segfault/32/687_2.png) [@SegFault](https://hub.mender.io/u/SegFault)\
**Post date:** [August 19, 2021, 9:55pm UTC](https://hub.mender.io/t/download-state-timeout-does-not-report-as-failure/4021/1 "2021-08-19T21:55:31Z")

</div>

**Board** : imx8-som running Yocto Dunfell deployment  
**Mender Version** : 2.5.1

**Exhibited Behavior** : We are running an update procedure that has a Download\_Enter state script being called. This state script has a retry ability that is triggered based on internal system checks. We have set “StateScriptRetryTimeoutSeconds” to 7200 (2 hours). We are testing a scenario where Download\_Enter retrys until timeout. Upon timeout we see the below logs. The system has a valid wifi connection though it does not notify hosted Mender of a failure. It also appears to not internally track this as on reboot the system attempts to download again going from sync-\>download.

Is a failure at Download not considered a failure of update?

**Expected Behavior** : The timeout on Download\_Enter should triggered a update failure and informed hosted Mender

**Log** :  
Aug 19 21:04:35 som-imx8 mender[710]: time=“2021-08-19T21:04:35Z” level=info msg=“State transition: update-check [Sync] → update-fetch [Download\_Enter]”  
Aug 19 21:04:40 som-imx8 mender[710]: time=“2021-08-19T21:04:40Z” level=info msg=“statescript: Download\_Enter\_10 requested a retry”  
Aug 19 21:05:12 som-imx8 mender[710]: time=“2021-08-19T21:05:12Z” level=info msg=“statescript: Download\_Enter\_10 requested a retry”  
Aug 19 21:05:46 som-imx8 mender[710]: time=“2021-08-19T21:05:46Z” level=error msg="transient error: error calling enter script for (error) update-fetch state: error running enter state script(s) for "  
Aug 19 21:05:46 som-imx8 mender[710]: time=“2021-08-19T21:05:46Z” level=info msg=“State transition: update-fetch [Download\_Enter] → error [Error]”  
Aug 19 21:05:46 som-imx8 mender[710]: time=“2021-08-19T21:05:46Z” level=info msg=“Handling error state, current error: transient error: error calling enter script for (error) update-fetch state: erro”  
Aug 19 21:05:46 som-imx8 mender[710]: time=“2021-08-19T21:05:46Z” level=info msg=“State transition: error [Error] → idle [Idle]”  
Aug 19 21:05:46 som-imx8 mender[710]: time=“2021-08-19T21:05:46Z” level=info msg=“State transition: idle [Idle] → check-wait [Idle]”

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [August 20, 2021, 5:35am UTC](https://hub.mender.io/t/download-state-timeout-does-not-report-as-failure/4021/2 "2021-08-20T05:35:17Z")

</div>

Correct, the first point where an update is considered “in progress”, is inside the Download state itself, in other words in between Download\_Enter and Download\_Leave. Only updates that are in progress will be marked as failed.
