Skip to content

Commit

Permalink
skip ns deletion if node.kind=bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Nov 6, 2020
1 parent 5e20a61 commit e27ae38
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions clab/netlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,13 @@ func (c *cLab) createvethToBridge(l *Link) error {
// DeleteNetnsSymlinks deletes the symlink file created for each container netns
func (c *cLab) DeleteNetnsSymlinks() (err error) {
for _, node := range c.Nodes {
log.Infof("Deleting %s network namespace", node.LongName)
if err := deleteNetnsSymlink(node.LongName); err != nil {
return err
if node.Kind != "bridge" {
log.Infof("Deleting %s network namespace", node.LongName)
if err := deleteNetnsSymlink(node.LongName); err != nil {
return err
}
}

}

return nil
Expand Down

0 comments on commit e27ae38

Please sign in to comment.