cri-tools icon indicating copy to clipboard operation
cri-tools copied to clipboard

crictl rmi with force option

Open AsherShoshan opened this issue 6 years ago • 22 comments

looking for the Docker equivalence docker rmi -f imageid. Is there any?

AsherShoshan avatar Aug 13 '19 07:08 AsherShoshan

Hey @AsherShoshan, is this the same request as in https://github.com/kubernetes-sigs/cri-tools/issues/399? Do you think we can close this on if favor of it?

saschagrunert avatar Aug 19 '19 13:08 saschagrunert

No. It's not the same.

On Mon, Aug 19, 2019 at 4:19 PM Sascha Grunert [email protected] wrote:

Hey @AsherShoshan https://github.com/AsherShoshan, is this the same request as in #399 https://github.com/kubernetes-sigs/cri-tools/issues/399? Do you think we can close this on if favor of it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/cri-tools/issues/504?email_source=notifications&email_token=ALCEMQPSHGHONCKMMSRLNU3QFKMXHA5CNFSM4ILH2YZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4S44SQ#issuecomment-522571338, or mute the thread https://github.com/notifications/unsubscribe-auth/ALCEMQKZGRMWZH56HF5ODITQFKMXHANCNFSM4ILH2YZQ .

AsherShoshan avatar Aug 19 '19 14:08 AsherShoshan

The Kubernetes CRI is not able to specify something like a force flag for image removal. For example CRI-O fails if the image is currently in use. The API states that the call should not return an error if the image has been already removed. @feiskyer, is there any expected behavior when an image is in use?

saschagrunert avatar Sep 04 '19 11:09 saschagrunert

All, The use case is: If you a pod with container image :latest, and the imagePullPolicy is "ifnotpresent" - Then you have no way to refresh the image with a newer image. (except for rebooting the worker node or try find a node which image is not pulled there... ) When the container run-time engine is Docker, you can docker rmi -f , and then the image will be refreshed. So what are the options to refresh the image with cri-o Asher

On Wed, Sep 4, 2019 at 2:34 PM Sascha Grunert [email protected] wrote:

The Kubernetes CRI is not able to specify something like a force flag for image removal. For example CRI-O fails if the image is currently in use. The API states that the call should not return an error if the image has been already removed. @feiskyer https://github.com/feiskyer, is there any expected behavior when an image is in use?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/cri-tools/issues/504?email_source=notifications&email_token=ALCEMQNXAECZOHWT2HJLUT3QH6MNLA5CNFSM4ILH2YZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53ISLA#issuecomment-527862060, or mute the thread https://github.com/notifications/unsubscribe-auth/ALCEMQJNRDFQZVPM7INAXZ3QH6MNLANCNFSM4ILH2YZQ .

AsherShoshan avatar Sep 04 '19 12:09 AsherShoshan

Alright, so one approach could be to force stop the containers before actually removing the image. The problem is now that we cannot guarantee that the kubelet does not re-schedule the workloads before we actually were able to remove the image. :-/

In docker, if you forcefully remove an image, then there will be still one image left where the container runs in. This image cannot be removed and docker will reject it by something like:

> docker rmi -f 961769676411
Error response from daemon: conflict: unable to delete 961769676411 (cannot be forced) - image is being used by running container b1bdc1cf2207

saschagrunert avatar Sep 04 '19 13:09 saschagrunert

All, The use case is: If you a pod with container image :latest, and the imagePullPolicy is "ifnotpresent" - Then you have no way to refresh the image with a newer image.

You could pull the new image via crictl pull and restart the containers.

saschagrunert avatar Sep 04 '19 13:09 saschagrunert

On Wed, Sep 4, 2019 at 4:37 PM Sascha Grunert [email protected] wrote:

All, The use case is: If you a pod with container image :latest, and the imagePullPolicy is "ifnotpresent" - Then you have no way to refresh the image with a newer image.

You could pull the new image via crictl pull and restart the containers.

Do it on every node...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/cri-tools/issues/504?email_source=notifications&email_token=ALCEMQNITPWCIOFG6O4IQW3QH622BA5CNFSM4ILH2YZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD53S4XA#issuecomment-527904348, or mute the thread https://github.com/notifications/unsubscribe-auth/ALCEMQNFYH6WHWD7Z5GPYTLQH622BANCNFSM4ILH2YZQ .

AsherShoshan avatar Sep 04 '19 13:09 AsherShoshan

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Dec 03 '19 14:12 fejta-bot

/remove-lifecycle stale

saschagrunert avatar Dec 03 '19 14:12 saschagrunert

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Mar 02 '20 14:03 fejta-bot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot avatar Apr 01 '20 15:04 fejta-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

fejta-bot avatar May 01 '20 15:05 fejta-bot

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar May 01 '20 15:05 k8s-ci-robot

any news here?

abdennour avatar Jun 08 '22 11:06 abdennour

/reopen

abdennour avatar Jun 08 '22 11:06 abdennour

@abdennour: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jun 08 '22 11:06 k8s-ci-robot

@abdennour thanks for reaching out! Do you consider working on a solution around this?

saschagrunert avatar Jun 08 '22 11:06 saschagrunert

I am thinking about -f option to be added @saschagrunert

abdennour avatar Jun 08 '22 11:06 abdennour

I am thinking about -f option to be added @saschagrunert

We would have to ensure that the containers are stopped before removing the image. I mean, yeah let's propose that as a PR.

saschagrunert avatar Jun 08 '22 11:06 saschagrunert

/assign @abdennour

saschagrunert avatar Jun 08 '22 11:06 saschagrunert

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 06 '22 11:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 06 '22 12:10 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Nov 05 '22 12:11 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 05 '22 12:11 k8s-ci-robot

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Feb 05 '23 08:02 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Mar 07 '23 08:03 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Apr 06 '23 08:04 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Apr 06 '23 08:04 k8s-ci-robot