Skip to content

[14.5-stable] pillar: keep purges from leaving the old app generation behind - #6880

Merged
rene merged 1 commit into
lf-edge:14.5-stablefrom
milan-zededa:14.5-backport-6257-purge-stale-volumerefs
Oct 26, 2026
Merged

rene merged 1 commit into
lf-edge:14.5-stablefrom
milan-zededa:14.5-backport-6257-purge-stale-volumerefs

Conversation

@milan-zededa

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

Copy link
Copy Markdown
Contributor

Description

Backport of #6257 to 14.5-stable.

Partial backport of #6257 (the original PR is mostly about another hypervisor flavor), cherry-picked with -x from 9c2eecf8de; the commit message notes what was left out. Only the zedmanager part is backported, together with its unit tests: an old VolumeRefStatus waited forever for a volumemgr update that never comes after a reboot, which left the purge stuck. The backported part applies without conflicts.

Without this fix TestVMAppPurgeAfterPowerCycle fails: a purge issued while the device is rebooting leaves the application stuck.

PR dependencies

None.

How to test and validate this PR

Covered by the evetest test TestVMAppPurgeAfterPowerCycle (added to 14.5-stable by #6873):

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

Changelog notes

Fixed an application purge that got stuck when the device was rebooted in the middle of it.

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.

@milan-zededa
milan-zededa requested a review from rouming as a code owner October 20, 2026 07:31
@milan-zededa milan-zededa changed the title [14.5-stable] eve-k: fix purge leaving stale VMIRS generations and volume refs [14.5-stable] pillar: keep purges from leaving the old app generation behind Oct 20, 2026
@milan-zededa
milan-zededa force-pushed the 14.5-backport-6257-purge-stale-volumerefs branch 2 times, most recently from 808f290 to 48ed424 Compare October 20, 2026 07:57
A purge must delete the previous generation of an app before it creates
the next one.

zedmanager waits for ever for a volume-ref removal. 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 after a reboot), 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.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrew Durbin <andrewd@zededa.com>
(cherry picked from commit 9c2eecf)
Signed-off-by: Milan Lenco <milan@zededa.com>

Partial backport: only the zedmanager change (waiting for ever for a
volume-ref removal) and its unit tests are taken. The other changes of
the original commit do not apply to this branch and are left out.
@milan-zededa
milan-zededa force-pushed the 14.5-backport-6257-purge-stale-volumerefs branch from 48ed424 to f3e4573 Compare October 22, 2026 14:16
@rene
rene merged commit 151d2d4 into lf-edge:14.5-stable Oct 26, 2026
46 of 48 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.

3 participants