Skip to content

Commit

Permalink
Merge pull request #17333 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-17313-to-release-3.7

Automatic merge from submit-queue.

Automated cherry-pick of #17313 on release-3.7

This is an automated cherry-pick of #17313

/assign smarterclayton
  • Loading branch information
openshift-merge-robot authored Nov 20, 2017
2 parents 250e6d7 + 33315ae commit 98f8714
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/network/node/ovscontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ func (oc *ovsController) AlreadySetUp() bool {
return false
}
expectedVersionNote := oc.getVersionNote()
for _, flow := range flows {
parsed, err := ovs.ParseFlow(ovs.ParseForDump, flow)
if err == nil && parsed.Table == ruleVersionTable && parsed.NoteHasPrefix(expectedVersionNote) {
return true
// The "version" flow should be the last one, so scan from the end
for i := len(flows) - 1; i >= 0; i-- {
parsed, err := ovs.ParseFlow(ovs.ParseForDump, flows[i])
if err == nil && parsed.Table == ruleVersionTable {
return parsed.NoteHasPrefix(expectedVersionNote)
}
}
return false
Expand Down

0 comments on commit 98f8714

Please sign in to comment.