hawkbit
hawkbit copied to clipboard
Unnecessary CANCEL_DOWNLOAD event over DMF Api
How to reproduce:
- Prepare 3 OS only distributions with SW Modules
- Create a DMF Api target
- Upgrade target with Distribution 1 (Device gets DOWNLOAD_AND_INSTALL event, action = 1)
- Upgrade target with Distribution 2 (Device gets CANCEL_DOWNLOAD, action = 1 which is OK)
- Upgrade target with Distribution 3 (Device gets CANCEL_DOWNLOAD, action = 2 which is NOK)
At this point device has no idea about action 2 so canceling it makes no sense. Hawkbit could automatically cancel action 2 and send DOWNLOAD_AND_INSTALL Dist 3 just after confirming or canceling action 1 by the device.
Indeed you're totally right. The 2nd assignment for Distribution 2
is never seen by the client in your
setup with 3 (or more) assignments in a row. So there is definitely room for improvement in order to avoid the superfluous message.
There is a feature called "Action auto-closing" which closes canceled actions automatically. If this setting is enabled no CANCEL_DOWNLOAD
messages are send at all. Maybe this is of any help for you in the meanwhile