Repository navigation
feat: allow a target to set offline assigned distribution set - #1620
Conversation
|
Can one of the admins verify this patch? |
b9b1ed6 to
3cc5f12
Compare
Signed-off-by: Florian Bezannier <[email protected]>
3cc5f12 to
dcf589b
Compare
|
@avgustinmm would you be able to review this PR soon ? |
@flobz thanks for your contribution. By coincidence, I was reviewing the PR at the same time you wrote. Though I added many comments into my review they are, in general, mostly related to same thing - not exposing backend management service methods to controller permissions. I have some questions regarding the motivation of the PR. If the target requests a rollback I suppose the scenario would be something like:
However, I'm not sure how "allow to know a target version before first update (eg: after flashing)" would work? I'm still not sure these are real usecases. Isn't it up to a backend service, responsible for device management, to provision installed ds info and to "realize" error states and to launch recover/rollback actions? And finally - since this is an DDI API method it shall be very stable so it is very important the path of the method. At the moment I'm not sure installedBase is a proper path. |
In the case where no version is assigned to the target because we don't want to update it, it's nice to know it's version no ?
In my opinion a target should be autonomous. We use rauc with two slot so, for example if one slot is corrupt target should automatically switch to the other slot and tell hawkbit that the installed version isn't anymore the version on the corrupt slot but version on the healthy slot. |
|
Seconded - I'm also using a 2-partition layout for updates, as well as a recovery mode that flashes a "golden image" to both partitions in certain scenarios. It's important for the device to be the source of truth because even the best backend can't handle all error cases. In the past week I've encountered two issues where the device was on a different version than hawkbit thought
|
|
Hi, I looked again at the PR and discussion. The point is to change the installed distribution set reference of the target - with the provisioning one or with offline installed/applied one. Why then do assign which changes assigned distribution set and create actions - which none will ever finish? Or device will then confirm it (that's why I asked about the flow). |
|
Hello @avgustinmm , |
|
I propose to implement a method updateInstalledVersion which will set target's installedDistributionSet to the version specified by device. This will:
|
|
Ok I understand thanks. It can lead to issue in certain case maybe, for eg: Given a dual boot system with v1 on filesystem1 and v2 on filesystem 2. At this point assigned version is still v2 so hawkbit will ask the system to update and we don't want that no ?
The device just called the new API endpoint 1 time an the action is marked as finish. |
|
@flobz,
So, it seems it does what you need. You could resolve the branch conflicts and we'll try to find out the proper REST API endpoint for it (hope next week). Also, please document the API endpoint with "Experimental, could be changed" or something like this to get the notion that it's not still final/stable. |
|
Ok great news! Thanks. |
Hello,
This PR allows a target to update it's assigned version (fix: #446).
It's relies on #563 but allow a target to do that it self instead of using Management API.
why :
Related discussion:
#242