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
mgmt: hawkbit: use SMF #70787
base: main
Are you sure you want to change the base?
mgmt: hawkbit: use SMF #70787
Conversation
49080dc
to
80fa584
Compare
d1a50eb
to
4ae2630
Compare
d01cb3b
to
93104c8
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.
Consider transitioning to an error-handling state rather than using smf_set_state(SMF_CTX(s), NULL);
93104c8
to
7533803
Compare
This is great! We have considered rewriting the implementation to use a state machine due to multiple issue (I previously wrote in the roadmap issue). As I wrote there, we have made adaptions and bug fixes e.g., issues with double freeing and handling of NULL response (crashes hard during download if not checked). But I see that you have improved on the malloc and I strongly believe that the SMF will solve a bunch of issues itself. I would like to give this a try. I will merge (locally for testing) our adaptions e.g., a dynamic config e.g., setting endpoints and tokens (during a device provisioning over BLE) - I saw that it already exist a PR for a similar change. |
Thanks for the feedback! The same is true for new features, feel free to contribute. Just look at the features we added to hawkBit in the last weeks: here |
a602bd4
to
469e9d5
Compare
free(hb_context.response_data); | ||
k_sem_give(&probe_sem); | ||
return hb_context.code_status; | ||
smf_set_terminate(SMF_CTX(s), s->hb_context.code_status); |
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.
Can this ever be zero? e.g. with a successful download?
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.
No
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.
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.
Yes it does, but not including today's changes.
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.
Yes it does, but not including today's changes.
Heh. okay.
c78cf8d
to
2a5891a
Compare
7ce8fce
to
7d4a900
Compare
Tested the recent changes, works fine! I guess I don't have the buttons to approve this... Awesome work, feel much more rigid now! 🙂 |
141da3d
to
4480356
Compare
Integrated latest changes and tested them, this includes:
No issues. We have a setup where devices are OTA updated every X h, stress test. I will create a alpha release with your latest changes and run in the setup. I can get back to you with the result after the weekend. |
thats sounds good |
93ba8d5
to
49c95fc
Compare
staticly init hawkbit_work_handle Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add option for autohandler to only run once. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The devices have OTA updated as expected over the weekend. I saw that you pushed some changes today. Should these affect the SMF? |
It shouldn't. See them here: https://github.com/zephyrproject-rtos/zephyr/compare/cd2578014f1965de9747b82ac29cc929504ee273..93ba8d566c509b1b8b6dd383d751843ae10386f2 |
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.
Looks good to me. I have performed integration testing - multiple devices getting OTA updated every 1 h, over one weekend.
Add hawkbit_autohandler_wait() to be able to wait for the autohandler to finish. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Also use a workqueue, when execution of hawkBit is requested via shell. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
If the run of the autohandler is started from shell, it will be logged. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Be able to delay the next run of the hawkbit autohandler. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Mention change of hawkbit autohandler and shell in the migration guide and the release notes. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
use smf for hawkbit. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
remove unused hawkbit responses. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
allow the use of other tenants. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
rename close to cancel, as it is more fitting. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Be able to change the tls certicicate tag. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
49c95fc
to
a94b138
Compare
Use the State Machine Framework for hawkBit. Includes a lot of cleanup of the hawkBit subsystem.
Resolves: #71576
Resolves: #71691
Resolves: #71759
Depends on/the following PRs should be merged before this:
the commits from before
mgmt: hawkbit: use SMF
are from #71037this is a WIP