Skip to content
Merged
Show file tree
Hide file tree
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
174 changes: 146 additions & 28 deletions mocks/pkg/ovs/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 2 additions & 22 deletions pkg/controller/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,6 @@ func (c *Controller) gcLogicalSwitch() error {
}
klog.Infof("finish to gc logical switch")

klog.Infof("start to gc dhcp options")
dhcpOptions, err := c.OVNNbClient.ListDHCPOptions(c.config.EnableExternalVpc, nil)
if err != nil {
klog.Errorf("failed to list dhcp options, %v", err)
return err
}
uuidToDeleteList := []string{}
for _, item := range dhcpOptions {
if len(item.ExternalIDs) == 0 || !subnetNames.Has(item.ExternalIDs["ls"]) {
uuidToDeleteList = append(uuidToDeleteList, item.UUID)
}
}
klog.Infof("gc dhcp options %v", uuidToDeleteList)
if len(uuidToDeleteList) > 0 {
if err = c.OVNNbClient.DeleteDHCPOptionsByUUIDs(uuidToDeleteList...); err != nil {
klog.Errorf("failed to delete dhcp options by uuids, %v", err)
return err
}
}
klog.Infof("finish to gc dhcp options")
return nil
}

Expand Down Expand Up @@ -530,8 +510,8 @@ func (c *Controller) markAndCleanLSP() error {
continue
}

klog.Infof("gc logical switch port %s with uuid %s", lsp.Name, lsp.UUID)
if err := c.OVNNbClient.DeleteLogicalSwitchPortByUUID(lsp.ExternalIDs[ovs.LogicalSwitchKey], lsp.UUID); err != nil {
klog.Infof("gc logical switch port %s", lsp.Name)
if err := c.OVNNbClient.DeleteLogicalSwitchPort(lsp.Name); err != nil {
klog.Errorf("failed to delete lsp %s: %v", lsp.Name, err)
return err
}
Expand Down
Loading
Loading