Skip to content

[16.0-stable] eve-k: fix purge leaving stale VMIRS generations and volume refs - #6848

Merged
eriknordmark merged 1 commit into
lf-edge:16.0-stablefrom
milan-zededa:16.0-backport-6257-purge-volume-refs
Oct 26, 2026
Merged

eriknordmark merged 1 commit into
lf-edge:16.0-stablefrom
milan-zededa:16.0-backport-6257-purge-volume-refs

Conversation

@milan-zededa

@milan-zededa milan-zededa commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Backport of #6257 to 16.0-stable, partially: only the generic zedmanager part.

The original change is mostly kubevirt (eve-k) code, which does not exist in
16.0, plus evetest purge tests for the kube path. What applies to 16.0 is
defect 3 of the commit message: on a purge, doInstall parks the old
VolumeRefStatus and waits for volumemgr to confirm its deletion; if volumemgr
has no live status for it in this boot (e.g. a reboot wiped the ephemeral
state), the confirmation never comes and the app stays in DownloadAndVerify.
zedmanager now drops the reference when volumemgr's live status is already
absent.

The cherry-pick (with -x, from 9c2eecf8de, via its 17.0-stable backport)
conflicted in the kubevirt files; the conflicts are resolved by dropping all
kubevirt changes, the kubevirt documentation, and the DomainStatus.DomainId
comment that describes only kubevirt. Only zedmanager/updatestatus.go and its
unit test are kept, and the commit message is reduced to that part.

Without this fix TestVMAppPurgeAfterPowerCycle fails: the purge issued while
the device is down never completes after boot (the persisted purge counter does
not advance).

PR dependencies

None.

How to test and validate this PR

Covered by the evetest test TestVMAppPurgeAfterPowerCycle (added to 16.0-stable by #6842):

EVETEST_EVE_VERSION=<16.0-stable build with this PR> make evetest NAME=TestVMAppPurgeAfterPowerCycle

The test passes only with this PR together with the backports of #5618 (#6846) and #5742 (#6847).

Changelog notes

Fixed application purge not completing when the purge was requested while the device was powered off.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR

For backport PRs (remove it if it's not a backport):

  • I've added a reference link to the original PR
  • PR's title follows the template

And the last but not least:

  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

…firm

On a purge, doInstall parks the old VolumeRefStatus and waits for
volumemgr to confirm the delete. If volumemgr has no live status for
that reference in this boot (for example because a reboot wiped the
ephemeral state), the confirmation never comes. The app stays in
DownloadAndVerify and never asks for the new volume.

zedmanager now looks at volumemgr's live status first, and drops the
reference if it is already absent.

Only the zedmanager part of the original change is picked. The
kubevirt changes in it are not applicable to this branch.

(cherry picked from commit 9c2eecf)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 26.73%. Comparing base (c9e7c2a) to head (391722d).
⚠️ Report is 26 commits behind head on 16.0-stable.

Additional details and impacted files
@@               Coverage Diff               @@
##           16.0-stable    #6848      +/-   ##
===============================================
- Coverage        29.12%   26.73%   -2.40%     
===============================================
  Files               10       25      +15     
  Lines             1133     4332    +3199     
===============================================
+ Hits               330     1158     +828     
- Misses             768     2947    +2179     
- Partials            35      227     +192     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eriknordmark
eriknordmark merged commit fcba5d4 into lf-edge:16.0-stable Oct 26, 2026
53 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants