Repository navigation
tmt: Tolerate failure of bootc-destructive-cleanup.service - #2670
Conversation
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>
3a101ab to
c0e4a54
Compare
|
@jmarrero-bot confirm my claims here. Review it and see if there is anything I am missing. |
There was a problem hiding this comment.
🟢 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.servicefailures. - 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
|
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
I think in general we should avoid packages "owning" any content in 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... |
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.