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

remove bridge network interface after network rm #660

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

junnplus
Copy link
Member

@junnplus junnplus commented Jan 3, 2022

Signed-off-by: ye.sijun junnplus@gmail.com

@@ -82,6 +82,11 @@ func networkRmAction(cmd *cobra.Command, args []string) error {
if err := os.RemoveAll(l.File); err != nil {
return err
}
// Remove the bridge network interface on the host.
if l.Plugins[0].Network.Type == "bridge" {
netIf := fmt.Sprintf("nerdctl%d", *l.NerdctlID)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fetched from here

"bridge": "nerdctl{{.ID}}",

Copy link
Member Author

@junnplus junnplus Jan 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is no easy way to get the name of the bridge from plugins.

l.Plugins[0].Network.Name always is empty.

Signed-off-by: ye.sijun <junnplus@gmail.com>
@AkihiroSuda AkihiroSuda merged commit 3cd3045 into containerd:master Jan 3, 2022
@AkihiroSuda AkihiroSuda added this to the v0.16.0 milestone Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants