-
Notifications
You must be signed in to change notification settings - Fork 198
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
fix: Resend the inventory when the device has reauthenticated #1714
base: master
Are you sure you want to change the base?
Conversation
@jo-lund, Let me know if you want to start the integration pipeline by mentioning me and the command "start pipeline". my commands and optionsYou can trigger a pipeline on multiple prs with:
You can start a fast pipeline, disabling full integration tests with:
You can trigger GitHub->GitLab branch sync with:
You can cherry pick to a given branch or branches with:
|
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.
Squash the two commits, please. Looks good to me otherwise although I have to admit I had to study the surrounding code for quite a while. Even though it was me who wrote it.
When using mutual TLS authentication the devices are authenticated by the gateway and will be automatically authorized in the server. This reauthentication happens without posting any error codes to the callback when polling for new deployments. Need to instead explcitly check if the device has reauthenticated and clear the inventory cache if that's the case. Ticket: MEN-7820 Changelog: None Signed-off-by: John Olav Lund <[email protected]>
9749448
to
a569060
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.
Great to receive your first contribution @jo-lund 🙌
The code looks good, the bug was were I suspected 🐞 🔍
This change honors a changelog entry, though. The rule of thumb is to ask "is this change release-able? Does it bring a feature or fixes a bug? Then a changelog entry is due"
You can write some user friendly text or just use Changelog: Title
to use the title of the commit during the release of the software.
Also, you should be able to run the pipeline yourself. I'll follow-up on this privately.
@mender-test-bot start pipeline |
Hello 😺 I created a pipeline for you here: Pipeline-1585816169 Build Configuration Matrix
|
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.
As Lluis said, you should probably set a changelog here, and you'll also need to rebase your PR on top of master :)
@jo-lund After a very long conversation with @vpodzime, we caught two other places where a similar fix is needed.
This was missing already from my original fix at #1678. If a device would have a longer poll interval than inventory submit interval (as possible use case, a device that only uses troubleshoot + inventory with a poll interval of once a year) then the clearing of Inventory data cached won't be handled.
There is a race condition when a 3rd party tool (a Mender add-on, or any other user software that uses our D-Bus API) does the re-authentication while |
When using mutual TLS authentication the devices are authenticated by the gateway and will be automatically authorized in the server. This reauthentication happens without posting any error codes to the callback when polling for new deployments. Need to instead explcitly check if the device has reauthenticated and clear the inventory cache if that's the case.
Ticket: MEN-7820
Changelog: None
External Contributor Checklist
🚨 Please review the guidelines for contributing to this repository.
The majority of our contributions are fixes, which means your commit should have
the form below:
git --signoff
. Also note that the signoff author must match the author of the commit.Description
Please describe your pull request.
Thank you!