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

[release-4.6] Bug 1972253: CARRY: fix missed learn for hybrid exgw #575

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion go-controller/hybrid-overlay/pkg/controller/node_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ func (n *NodeController) syncFlows() {
// and we accidentally pick up the old vtep flow and cache it. This should only ever happen on a pod update
// with an NS annotation VTEP change. We only need to ignore it for one iteration of sync.
if cacheEntry.ignoreLearn {
klog.V(5).Infof("Ignoring learned flow to add to hybrid cache for this iteration: %s", line)
klog.Infof("Ignoring learned flow to add to hybrid cache for this iteration: %s", line)
cacheEntry.ignoreLearn = false
cacheEntry.learnedFlow = ""
continue
Expand All @@ -631,6 +631,13 @@ func (n *NodeController) syncFlows() {
_, _, err = util.ReplaceOFFlows(extBridgeName, flows)
if err != nil {
klog.Errorf("Failed to add flows, error: %v, flows: %s", err, flows)
return
}

// handle resetting ignore learn as we may not have encountered some pods while
// iterating through the flows in OVS
for _, entry := range n.flowCache {
entry.ignoreLearn = false
}
}

Expand Down