Skip to content
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: volumemgr: update VRS every time VS changes #4498

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

europaul
Copy link
Contributor

This is the only place in the code base where volume ref status was not updated after volume status was potentially changed, which led to some changes in volumes to being seen by edge apps.

Changes in volume status need to be reflected to the app. This is done
through the volume reference status. So every time the function
doUpdateVol returns we need to check if the volume status has changed
and if so update the volume reference status accordingly.

Signed-off-by: Paul Gaiduk <[email protected]>
@europaul europaul added bug Something isn't working stable Should be backported to stable release(s) labels Dec 28, 2024
@europaul europaul changed the title fix: volumemgr: update vrs every time vs changes fix: volumemgr: update VRS every time VS changes Dec 28, 2024
Copy link

codecov bot commented Dec 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 20.90%. Comparing base (2e69dc3) to head (a529f4f).
Report is 21 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4498   +/-   ##
=======================================
  Coverage   20.90%   20.90%           
=======================================
  Files          13       13           
  Lines        2894     2894           
=======================================
  Hits          605      605           
  Misses       2163     2163           
  Partials      126      126           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@deitch
Copy link
Contributor

deitch commented Dec 29, 2024

Am I correct that this is not just updating the volume ref status, but also placing the updates inside the needUpdateVol logic, and only if something changed? Before, it always updated the volumeStatusRefCount and always published the volume status and the app disk metrics. Now, it does so only if the volume needs an update, and only if doUpdateVol() returned changed.

The logic change seems correct to me, but I want too be sure we capture it, at least in the PR comment.

@deitch
Copy link
Contributor

deitch commented Dec 29, 2024

Also one failing test. I will restart it.

@eriknordmark eriknordmark merged commit 0566cd7 into lf-edge:master Dec 29, 2024
48 of 59 checks passed
@europaul
Copy link
Contributor Author

Am I correct that this is not just updating the volume ref status, but also placing the updates inside the needUpdateVol logic, and only if something changed? Before, it always updated the volumeStatusRefCount and always published the volume status and the app disk metrics. Now, it does so only if the volume needs an update, and only if doUpdateVol() returned changed.

@deitch that's correct. I didn't mention it in the description, because it's not part of the fix logic. However calling those functions only when volume status changes is consistent with the rest of the code base - so we do the same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stable Should be backported to stable release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants