Skip to content

tmt: Tolerate failure of bootc-destructive-cleanup.service - #2670

Merged
ckyrouac merged 1 commit into
bootc-dev:mainfrom
jmarrero:tmt-tolerant-destructive-cleanup
Nov 25, 2026
Merged

ckyrouac merged 1 commit into
bootc-dev:mainfrom
jmarrero:tmt-tolerant-destructive-cleanup

Conversation

@jmarrero

Copy link
Copy Markdown
Contributor

This service is a best-effort one-shot which erases the previous OS after an alongside install; package scriptlets of the doomed old root can fail during the erase and put the unit in failed state, which is not fatal for the new install.

Tolerate its failure but print a warning with its journal so it stays visible in test logs. All other systemd-/bootc- unit failures remain fatal.

Copilot AI balanced review requested due to automatic review settings November 21, 2026 03:51
@bootc-bot
bootc-bot Bot requested a review from gursewak1997 November 21, 2026 03:51
This service is a best-effort one-shot which erases the previous
OS after an alongside install; package scriptlets of the doomed
old root can fail during the erase and put the unit in failed
state, which is not fatal for the new install.

Since the --cleanup option for alongside installs landed
(85b2419), guests installed that way run this unit on first
boot, so the readonly no-failed-units check trips on its
best-effort failures.

Tolerate its failure but print a warning with its journal so it
stays visible in test logs. All other systemd-*/bootc-* unit
failures remain fatal.

Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
@jmarrero
jmarrero force-pushed the tmt-tolerant-destructive-cleanup branch from 3a101ab to c0e4a54 Compare November 21, 2026 03:52
@jmarrero

Copy link
Copy Markdown
Contributor Author

@jmarrero-bot confirm my claims here. Review it and see if there is anything I am missing.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the cleanup-service failure-handling change.

No open issues 🎉

What changed in this PR

Updates the read-only TMT check to tolerate failure of the best-effort cleanup service after an alongside install, while keeping diagnostics visible and other checked unit failures fatal.

Changes:

  • Separates failed units into tolerated and fatal groups.
  • Logs a warning and journal output for bootc-destructive-cleanup.service failures.
  • Extracts journal collection into a shared helper.
File Description
tmt/​tests/​booted/​readonly/​014-test-no-failed-units.nu Tolerates cleanup-service failures with diagnostics while preserving assertions for other checked units.

Review effort: Balanced

@jmarrero

Copy link
Copy Markdown
Contributor Author

@ckyrouac
ckyrouac marked this pull request as ready for review November 25, 2026 03:11
@ckyrouac
ckyrouac merged commit b88f28b into bootc-dev:main Nov 25, 2026
97 of 100 checks passed
@cgwalters

Copy link
Copy Markdown
Member

I'm OK with this but I think a lot of the failures are things that should get fixed in the packages. A perfect example is

Nov 20 22:23:58 ip-172-31-26-49.us-east-2.compute.internal fedora-bootc-destructive-cleanup[1904]: warning: file /run/lvm: remove failed: No such file or directory

I think in general we should avoid packages "owning" any content in /run at all because it will get cleaned up across reboots anyways...or at least, rpm should be aware when operating on a non-mounted alternative sysroot that the content may not be there, etc.

I guess our use case of "remove packages from non-booted sysroot" is actually very rare in practice. It is kind of tempting to switch it over to run as a container...

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