fix: persist container FinishedTime even when exit code DB write fails#28112
Draft
kairosci wants to merge 2 commits intocontainers:mainfrom
Draft
fix: persist container FinishedTime even when exit code DB write fails#28112kairosci wants to merge 2 commits intocontainers:mainfrom
kairosci wants to merge 2 commits intocontainers:mainfrom
Conversation
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
1 similar comment
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
d629f01 to
05ab487
Compare
05ab487 to
9fb14b5
Compare
kairosci
added a commit
to kairosci/podman
that referenced
this pull request
Feb 18, 2026
Fixes: containers#28112 Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>
cbd7a7c to
26ba37f
Compare
When a container exits, handleExitFile() sets FinishedTime in the container state but was only attempting to save via AddContainerExitCode(). If that operation failed (e.g., DB error), the state including FinishedTime would never be persisted. This caused the container to show incorrect finish times like '292 years ago' instead of the actual exit time. The fix saves the complete container state to the database first, which includes FinishedTime. The exit code table is supplementary; if it fails, we log a warning but don't fail the entire operation since the main state is already persisted. Fixes: containers#27282 Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>
26ba37f to
6f3e317
Compare
Member
|
This won't fix the reported reproducer in #27282 - we cannot write to the database at all when the disk is full. I don't think that's the only issue with writing exit codes, but I don't see another reproducer in that issue, and I'm not sure if this will help. |
Member
|
I think instead of trying to write something somewhere, I would indicate to the user that the exit state is unknown. |
|
A friendly reminder that this PR had no activity for 30 days. |
Signed-off-by: Alessio Attilio <attilio.alessio@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
git commit -s). (If needed, usegit commit -s --amend). The author email must match the sign-off email address. See CONTRIBUTING.md for more information.Fixes: #27282in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
Fixes: #27282