Skip to content

Don't try to delete (nonexistent) OVS flows for headless/external services #18879

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

Merged
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
7 changes: 6 additions & 1 deletion pkg/network/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ func (node *OsdnNode) watchServices() {

func (node *OsdnNode) handleAddOrUpdateService(obj, oldObj interface{}, eventType watch.EventType) {
serv := obj.(*kapi.Service)
// Ignore headless services
// Ignore headless/external services
if !kapihelper.IsServiceIPSet(serv) {
return
}
Expand All @@ -499,6 +499,11 @@ func (node *OsdnNode) handleAddOrUpdateService(obj, oldObj interface{}, eventTyp

func (node *OsdnNode) handleDeleteService(obj interface{}) {
serv := obj.(*kapi.Service)
// Ignore headless/external services
if !kapihelper.IsServiceIPSet(serv) {
return
}

glog.V(5).Infof("Watch %s event for Service %q", watch.Deleted, serv.Name)
node.DeleteServiceRules(serv)
}
Expand Down