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

container: T6074: do not allow deleting images which have a container running #3053

Merged
merged 1 commit into from Feb 28, 2024

Conversation

c-po
Copy link
Member

@c-po c-po commented Feb 27, 2024

Change Summary

The current VyOS container image manipulation delete container image command allows force removal of container images - even if they still have a container running.

Drop the --force option from the op-mode script.

vyos@vyos:~$ delete container image 2636705a815a
Error: image used by 6adb0175d47f.. image is in use by a container: consider listing external containers and force-removing image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

Component(s) name

container

Proposed changes

How to test

Smoketest result

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

… running

The current VyOS container image manipulation "delete container image" command
allows force removal of container images - even if they still have a container
running.

Drop the --force option from the op-mode script.

vyos@vyos:~$ delete container image 2636705a815a
Error: image used by 6adb0175d47f.. image is in use by a container: consider
listing external containers and force-removing image
@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro and sever-sever and removed request for a team February 27, 2024 21:23
@dmbaturin dmbaturin merged commit e50b140 into vyos:current Feb 28, 2024
8 checks passed
@c-po c-po deleted the container-t6074 branch February 28, 2024 19:12
@c-po
Copy link
Member Author

c-po commented Feb 28, 2024

@Mergifyio backport sagitta

Copy link

mergify bot commented Feb 28, 2024

backport sagitta

✅ Backports have been created

c-po added a commit that referenced this pull request Feb 29, 2024
container: T6074: do not allow deleting images which have a container running (backport #3053)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants