Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions plugins/main/host-device/host-device.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@
if err != nil {
return err
}

// reboot node there no containerNs, first ipam del avoid ip leak
if cfg.IPAM.Type != "" {
if err := ipam.ExecDel(cfg.IPAM.Type, args.StdinData); err != nil {
return err
}
}

Check failure on line 221 in plugins/main/host-device/host-device.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (gci)
Copy link
Contributor

Choose a reason for hiding this comment

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

GitHub Actions told that there is some golang format error. Could you please take a look into it and fix it?

if args.Netns == "" {
return nil
}
Expand All @@ -220,12 +228,6 @@
}
defer containerNs.Close()

if cfg.IPAM.Type != "" {
if err := ipam.ExecDel(cfg.IPAM.Type, args.StdinData); err != nil {
return err
}
}

if !cfg.DPDKMode {
if err := moveLinkOut(containerNs, args.IfName); err != nil {
return err
Expand Down
Loading