Skip to content
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

fix prun pod with container #4422

Closed
wants to merge 1 commit into from

Conversation

QiWang19
Copy link
Collaborator

@QiWang19 QiWang19 commented Nov 1, 2019

fix #4346
This PR sets c.Force to true if user reply 'y' to system prune confirmation question.

Signed-off-by: Qi Wang qiwan@redhat.com

fix containers#4346
This PR sets c.Force to true if user reply 'y' to system prune confirmation question.

Signed-off-by: Qi Wang <qiwan@redhat.com>
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: QiWang19
To complete the pull request process, please assign rhatdan
You can assign the PR to them by writing /assign @rhatdan in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@QiWang19
Copy link
Collaborator Author

QiWang19 commented Nov 1, 2019

@mheon @TomSweeneyRedHat PTAL.
I am confused by the man page --force Do not prompt for confirmation. This cli value has been used not only to control the prompt of the confirmation.

@mheon
Copy link
Member

mheon commented Nov 1, 2019

This seems VERY dangerous. We're only supposed to be removing unused containers and pods - setting force is directly counter to that.

@mheon
Copy link
Member

mheon commented Nov 1, 2019

I think the original suggestion - removing containers before pods - might be more suitable here. We want to prune unused containers, then prune any pod with no containers but the infra container, then prune unused images.

@mheon
Copy link
Member

mheon commented Nov 1, 2019

(Would need to make sure we don't accidentally prune infra containers when we prune the containers, though)

@mheon
Copy link
Member

mheon commented Nov 1, 2019

The use of --force to set force for pruning pods and containers also seems concerning... I don't think we should be doing that.

@rhatdan
Copy link
Member

rhatdan commented Nov 1, 2019

We don't prompt, the way that Docker does, So we should just add this as a no-op.

If you run docker image prune
It prompts you to say "Are you sure" The --force gets rid of the prompt.

So Just add the flag so that we can work with existing scripts.

@QiWang19 QiWang19 closed this Nov 1, 2019
@QiWang19 QiWang19 deleted the prune_pod_ctr branch June 26, 2020 15:11
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Containers should be pruned before pods
4 participants