-
Notifications
You must be signed in to change notification settings - Fork 2.9k
reset: remove external containers on podman system reset #10789
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
reset: remove external containers on podman system reset #10789
Conversation
|
Added [NO TESTS NEEDED] for a check will add relevant tests after initial review if needed. |
b04a617 to
bcf786c
Compare
|
I think failing tests are flake. I'll re-kick CI |
|
I have a weak preference to have only one prompt. In fact, to keep things as they are but in case there are external containers to display them as follows: IMO, |
bcf786c to
86b80c9
Compare
|
@vrothberg Sure sounds good to me. Just a slight doubt how would human-users know about which external containers are getting purged. Its fine if it is generally acceptable that |
|
I agree only give one prompt, but output the external containers as well. |
|
/approve |
|
I'm not sure why the release test is failing with |
ae7fa06 to
2c9e314
Compare
|
@TomSweeneyRedHat Thanks resolved your feedback on latest commit. Example flouthoc@system:~/src/stable/glibc$ podman system reset
WARNING! This will remove:
- all containers
- all pods
- all images
- all build cache
WARNING! Following External Containers will be purged
CONTAINER ID NAME
c7d50cbfff74 busybox-working-container
3ab9923a9f8b busybox-working-container-1
bd371cdddd29 busybox-working-container-2
Are you sure you want to continue? [y/N] y |
cmd/podman/system/reset.go
Outdated
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.
| fmt.Println(`WARNING! The Following External Containers will be purged`) | |
| fmt.Println(`WARNING! The following external containers will be purged:`) |
|
Thanks, @flouthoc! Visually, I would find it more appealing if the the two lists would have the same format. Maybe something as below? Let's wait how the others think. |
@TomSweeneyRedHat that happens when someone manually presses the "Trigger" button for that test, usually because they see that it didn't run and they believe it should run. It shouldn't. It's an optional test that doesn't actually run and shouldn't run. If you've read HHGTTG, it's the equivalent of a big button that, when pressed, lights up and says "do not press this button again". |
|
@edsantiago Oh actually i triggered that test by mistake. 😢 😭 |
|
@flouthoc Make @vrothberg suggestion and then we can merge. |
[NO TESTS NEEDED] Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2c9e314 to
2243b60
Compare
|
@vrothberg Updated with suggested changes in lastest commit flouthoc@system:~/src/stable/glibc$ podman system reset
WARNING! This will remove:
- all containers
- all pods
- all images
- all build cache
WARNING! The following external containers will be purged:
- dbfc83909cbb (busybox-working-container)
- c37fb04008bd (busybox-working-container-1)
Are you sure you want to continue? [y/N] y |
vrothberg
left a comment
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: flouthoc, mheon, vrothberg 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 |
Following PR allows
podman system resetto remove all the external containers with a safety prompt when--forceis not provided. This makes sure thatpodman system resetperforms a complete nuke of all the containers.Attempts a feature patch for issue: #10755
Example
--forcesilently removes everything without any prompt.Example 2
flouthoc@system:~/src/stable/glibc$ podman system reset --force