Skip to content

Commit

Permalink
Merge pull request #556 from openshift-cherrypick-robot/cherry-pick-5…
Browse files Browse the repository at this point in the history
…51-to-release-4.7

[release-4.7] Bug 1965075: CARRY: fix missed learn for hybrid exgw
  • Loading branch information
openshift-merge-robot committed Jun 9, 2021
2 parents e71b4ad + e9d5dab commit fb107ca
Showing 1 changed file with 8 additions and 1 deletion.
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 @@ -610,7 +610,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 @@ -635,6 +635,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

0 comments on commit fb107ca

Please sign in to comment.