-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
podman system prune support prune unused networks #14556
Conversation
Yeah it could remove external cni networks. However for netavark it should not be a problem. Also we already changed podman system reset to delete all networks so I think it is just logical to do it for prune as well. |
245fee7
to
c169680
Compare
Thank you for reviewing. |
pkg/domain/infra/abi/system.go
Outdated
|
||
// Remove all unused netavark networks. | ||
// Does not remove cni networks because it could remove external cni networks. | ||
if ic.Libpod.GetNetworkBackend() == "netavark" { |
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.
Do we really want to differ here? As said before system reset already removes all cni networks so I see no reason why prune should not.
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.
Thank you for reviewing. I removed network backend branch.
On the other hand, I think there is a option to remove all CNI networks pruning function from "system reset".
If this options is better, I will try to fix "system reset".
dfac865
to
4811cb1
Compare
This is an enhancement for the podman system prune feature. In this issue, it is mentioned that 'network prune' should be wired into 'podman system prune' containers#8673 Therefore, I add the function to remove unused networks. Signed-off-by: Toshiki Sonoda <[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: Luap99, sstosh 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 |
This is an enhancement for the podman system prune feature.
In this issue, it is mentioned that 'network prune' should be
wired into 'podman system prune'
#8673
Therefore, I add the function to remove unused networks.
Signed-off-by: Toshiki Sonoda [email protected]
Does this PR introduce a user-facing change?