-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix/download only response #160
Bugfix/download only response #160
Conversation
According the the Hawkbit unit-tests, download-only deployment expects the status "retrieved" Signed-off-by: Vyacheslav Yurkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you use downloadonly
? If you use the downloaded RAUC bundle outside of rauc-hawkbit-updater, how can you be sure that it the download is complete and that it won't be replaced by another download while you're using it?
// skip installation if hawkBit asked us to do so | ||
if (!artifact->do_install && | ||
(!artifact->do_maintenance || g_strcmp0(artifact->do_maintenance, "available") == 0)) { | ||
active_action->state = ACTION_STATE_SUCCESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change anything, really?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. You mean that feedback alone would suffice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The active_action->state is for the rauc-hawkbit-updater internal state machine only. I think it's correct to set it to ACTION_STATE_SUCCESS
here.
While looking at this, I think we should revisit the code paths setting it back to the initial ACTION_STATE_NONE
(effectively sending acknowledgements on cancel requests). This does not look correct for all the cases.
The backend implementation decides (with the user interaction) when to do the actual update after the bundle is already on the device. The next step is the implementation of |
That's not clear to me, how is |
How would I put the bundle on the device without it? :) But I think I understand your concern. What if another download is started while the bundle is installed outside of rauc-hawkbit-updater? I guess this falls a bit out of scope of this particular fix, but I do have a few thoughts on it:
|
3678e77
to
d39146c
Compare
Exactly.
Instead of letting rauc-hawkbit-updater run as a daemon, you could probably call
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else looks good.
SUCCESS would translate from DDI state to action state "Downloaded", which is exactly what hawkbit expects in case of download-only deployemnt. Ref rauc#159 Signed-off-by: Vyacheslav Yurkov <[email protected]>
d39146c
to
ad332dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Modify unit test and response status for
downloadonly
deploymentsFixes #159