-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Pod Rm Infra Handling Improvements #11851
Conversation
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.
I think you should just add ctr.IsInfra()
to line 202, e.g.
if force || ctr.IsInfra() {
continue
}
I will add this @Luap99 but I think the main thing we want to do here is catch it in the first check because numCtrs should represent the non-exited containers. |
LGTM |
@rhatdan any idea why that prune test would be failing? seems to have one extra image listed in the local storage I see, I think the exited containers were no longer being removed because they weren't in the ctr array, leading the image to not be pruned |
I'm still really unclear as to how this is actually triggered. Has anyone managed to reproduce this locally? If so, can we figure out exactly how a pod with multiple containers is giving incorrect error messages? Because the logic in main looks solid to me as-is. |
Yeah I was able to recreate it just by making a pod and running two containers with alpine, and then removing the pod. I think we either should modify the |
But how are we getting that far in the first place? It looks like we should definitely be stopping on the existing |
so @mheon what do you expect the outcome here to be? should we allow removal when all containers are exited and only infra is running? or should this first error |
I think the expected outcome is that we do not remove, and print a list of the containers present in the pod preventing it from being removed. |
OK, maybe I'm wrong here... the |
podman pod create --name dan Everything works. podman pod create --name dan I would have thought these were the same. |
Can I suggest that we talk about this at cabal tomorrow, ensure we have consensus? Also, whatever we do, let's improve the manpages so it's actually clear what's going on. |
Sure, just let me know what you guys decide and I'll implement. I have class from 11-1:45 so I won't be able to come to the cabal. Actually, class from 11-12:15 is canceled tomorrow so I'll be there to discuss |
@mheon does this cover what we discussed in cabal? |
@containers/podman-maintainers PTAL, ended up being a simple fix where we just needed to add a check for |
Made changes so that if the pod contains all exited containers and only infra is running, remove the pod. resolves containers#11713 Signed-off-by: cdoern <[email protected]>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, Luap99 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 |
@mheon PTAL |
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
/lgtm |
What this PR does / why we need it:
Made it so that the pod is removed if the only running container is infra. An error was being triggered where we have exited containers and only infra running, the pod was failing to remove.
Which issue(s) this PR fixes:
resolves #11713
Signed-off-by: cdoern [email protected]