-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unconditionally remove conmon files before starting #4065
Unconditionally remove conmon files before starting #4065
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
LGTM |
Testing is not happy though. |
This broke starting containers on my Workstation 29 where things were somehow working regardless of the warning about
|
Oh, wait, wait, wait. This is happening too late in the process. Needs to be attached to |
We've been seeing a lot of issues (ref: containers#4061, but there are others) where Podman hiccups on trying to start a container, because some temporary files have been retained and Conmon will not overwrite them. If we're calling start() we can safely assume that we really want those files gone so the container starts without error, so invoke the cleanup routine. It's relatively cheap (four file removes) so it shouldn't hurt us that much. Also contains a small simplification to the removeConmonFiles logic - we don't need to stat-then-remove when ignoring ENOENT is fine. Signed-off-by: Matthew Heon <[email protected]>
65a7db2
to
407fba4
Compare
Ok, so my Workstation 29 is back to being as it used to be.
Let me now see if it unbreaks |
Next step on the logs is to get a print statement in stating our default log level, to see if it changed |
As before, the first failed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @mheon ready to merge?
return errors.Wrapf(err, "error removing container %s exit file", c.ID()) | ||
} | ||
if err := os.Remove(exitFile); err != nil && !os.IsNotExist(err) { | ||
return errors.Wrapf(err, "error removing container %s exit file", c.ID()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to throw out the question as I'm not sure. Would it be better to not return an error for each of these attempts? I.e. If one fails, note it, then try removing the next file, if that fails note it, then try next? Then at the end report all of the errors encountered? Otherwise, if there are multiple things wrong, will the user be able to clean up/investigate fully?
@vrothberg I don't know if this one actually solved the issue, which is why I'm sitting on it - @debarshiray indicates that it didn't, which makes me concerned that I hit a symptom and the underlying problem is unaddressed. |
Added a |
If you look very closely at #4061 and read between the lines, then it seems that this pull request at least made things move further. |
Ok, I have a better understanding of #4061 now. I don't think we should block this pull request just because it doesn't address #4061 fully. The remaining issue in #4061 is unrelated to this PR in my opinion. |
/hold cancel |
/lgtm |
We've been seeing a lot of issues (ref: #4061, but there are others) where Podman hiccups on trying to start a container, because some temporary files have been retained and Conmon will not overwrite them.
If we're calling start() we can safely assume that we really want those files gone so the container starts without error, so invoke the cleanup routine. It's relatively cheap (four file removes) so it shouldn't hurt us that much.
Also contains a small simplification to the removeConmonFiles logic - we don't need to stat-then-remove when ignoring ENOENT is fine.