# Device-side control of update: delaying, pausing, rescheduling

**URL:** <https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987>\
**Category:** General Discussions\
**Tags:** state-scripts, mender-client, update-control-map\
**Created:** [July 7, 2023, 6:34am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987 "2023-07-07T06:34:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nareshtech20](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nareshtech20](https://hub.mender.io/u/nareshtech20)\
**Post date:** [July 7, 2023, 6:34am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/1 "2023-07-07T06:34:38Z")

</div>

How to increase update-control-map expiry time ?

---

<div class="post-metadata">

**Author:** ![nareshtech20](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nareshtech20](https://hub.mender.io/u/nareshtech20)\
**Post date:** [July 7, 2023, 6:39am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/2 "2023-07-07T06:39:34Z")

</div>

Is there way to reschedule an update to later time by user on client device based on user confirmation ?

---

<div class="post-metadata">

**Author:** ![nareshtech20](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nareshtech20](https://hub.mender.io/u/nareshtech20)\
**Post date:** [July 7, 2023, 6:28am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/3 "2023-07-07T06:28:37Z")

</div>

Is there a way to pause all Artifact Installations by default ? any mender client configuration ?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 7, 2023, 7:40am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/4 "2023-07-07T07:40:28Z")

</div>

Hi @nareshtech20,

I took the liberty to combine your posts for a more coherent discussion. According to the documentation, the situation is as follow:

- you can essentially pause a deployment indefinitely by repeatedly setting `pause` through the update control map.
- if a deployment has been aborted or cancelled, then it can not be directly rescheduled, as it will be in failed state
- the `mender.conf` file does not provide a mechanism to block by default.

From the impression I get of your questions, my suggestion would rather be to not run the Mender client continuously, but invoke it once the user is ready to install an update. The idea is as follows:

1. your GUI (or whatever) polls the Mender Server API to check for a deployment.
2. if a deployment is active, you notify the user
3. once the user confirms, you start the Mender Client to carry out the actual installation.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![nareshtech20](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nareshtech20](https://hub.mender.io/u/nareshtech20)\
**Post date:** [July 7, 2023, 8:03am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/5 "2023-07-07T08:03:33Z")

</div>

Thank you @TheYoctoJester for combining these related posts.

Did not think of this approach of custom polling to mender server for active deployment.

Thought of leveraging mender clients flow to discover new update and check if its eligible based on device type/group & existing software version, if all conditions are met, then ask user’s confirmation.  
If user want to either proceed or deny update, there is no issue, it follows update flow.  
In case user want to postpone update to 1 hour later or to EOD (specific time) or remind after some time, how to handle this ?  
is it advisable to update _update-control-map_ in state scripts ? or through external script ?

Regards,  
Naresh

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 7, 2023, 8:09am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/6 "2023-07-07T08:09:24Z")

</div>

Hi @nareshtech20,

> Thought of leveraging mender clients flow to discover new update and check if its eligible based on device type/group & existing software version, if all conditions are met, then ask user’s confirmation.

This is what the Mender backend does. The device type and [software versioning](https://docs.mender.io/artifact-creation/software-versioning) features, together with groups fulfill exactly that requirement, so a device is only presented with updates that are applicable to it.

If you need fine grained control, then the way is to use the update control maps over D-Bus, and not do it in state scripts but the application (or a subprocess) that interacts with the user.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![nareshtech20](https://avatars.discourse-cdn.com/v4/letter/n/46a35a/32.png) [@nareshtech20](https://hub.mender.io/u/nareshtech20)\
**Post date:** [July 7, 2023, 11:27am UTC](https://hub.mender.io/t/device-side-control-of-update-delaying-pausing-rescheduling/5987/7 "2023-07-07T11:27:20Z")

</div>

Hi @TheYoctoJester,

That’s great, if we have way to find active deployment for specific device based on all required criteria is met. Please share API to find active deployment for device.

Is there any update control map interface over DBus to reschedule update or repeated **pause** is the only solution ?

Regards,  
Naresh
