Skip to content

Commit

Permalink
cluster.go: Disable Southbound DB conditional monitoring.
Browse files Browse the repository at this point in the history
ovn-controller enables conditional monitoring by default for tables in
the Southbound Database it is interested in (e.g., Logical_Flow). This
effectively performs row level filtering for the SB DB tables such that
an ovn-controller would receive only updates about records that refer to
logical datapaths that are local to the chassis.

However, in an ovn-kubernetes cluster, all node logical switches are
connected to the ovn-cluster-router which forces all ovn-controllers to
register for updates about all logical switches.

The conditional monitoring implementation in OVSDB turns out to not
scale so well in such scenarios.

OVN 20.03 supports a new configuration knob (ovn-monitor-all=true) which
instructs ovn-controllers to not use row level filtering of records.
This was introduced by:
ovn-org/ovn@3c355e3

ovn-kubernetes per node gateway routers are bound to individual chassis
and should not generate openflow entries on other chassis. This is also
handled in OVN 20.03 by follow up commits:
ovn-org/ovn@166a33c
ovn-org/ovn@eebef50

Note regarding backwards compatibility:
When ovn-kubernetes is used with older OVN versions (i.e., <20.03)
setting "ovn-monitor-all=true" has no effect as the knob will just be
ignored by ovn-controller.

Reported-by: Girish Moodalbail <[email protected]>
Reported-at: https://groups.google.com/d/msg/ovn-kubernetes/OalZ5-2ljnA/FOGlAyK5DQAJ
Signed-off-by: Dumitru Ceara <[email protected]>
  • Loading branch information
dceara committed Feb 23, 2020
1 parent 7d51345 commit 4155528
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions go-controller/pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func setupOVNNode(node *kapi.Node) error {
fmt.Sprintf("external_ids:ovn-openflow-probe-interval=%d",
config.Default.OpenFlowProbe),
fmt.Sprintf("external_ids:hostname=\"%s\"", nodeName),
"external_ids:ovn-monitor-all=true",
)
if err != nil {
return fmt.Errorf("error setting OVS external IDs: %v\n %q", err, stderr)
Expand Down
6 changes: 4 additions & 2 deletions go-controller/pkg/cluster/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ var _ = Describe("Node Operations", func() {
"external_ids:ovn-encap-ip=%s "+
"external_ids:ovn-remote-probe-interval=%d "+
"external_ids:ovn-openflow-probe-interval=%d "+
"external_ids:hostname=\"%s\"",
"external_ids:hostname=\"%s\" "+
"external_ids:ovn-monitor-all=true",
nodeIP, interval, ofintval, nodeName),
})

Expand Down Expand Up @@ -112,7 +113,8 @@ var _ = Describe("Node Operations", func() {
"external_ids:ovn-encap-ip=%s "+
"external_ids:ovn-remote-probe-interval=%d "+
"external_ids:ovn-openflow-probe-interval=%d "+
"external_ids:hostname=\"%s\"",
"external_ids:hostname=\"%s\" "+
"external_ids:ovn-monitor-all=true",
nodeIP, interval, ofintval, nodeName),
})
fexec.AddFakeCmd(&ovntest.ExpectedCmd{
Expand Down

0 comments on commit 4155528

Please sign in to comment.