Skip to content

Commit

Permalink
features.c: Always wait on the rconn.
Browse files Browse the repository at this point in the history
When performing feature detection with OVS, we use an rconn connected to
br-int.mgmt to query for features. If the rconn is not connected, then
we would exit early. However, this early exit did not call
rconn_run_wait() or rconn_recv_wait(). Therefore, if the rconn were in
a state such as BACKOFF or CONNECTING, we would not wait on the rconn's
fd for activity.

In most cases, nobody would notice this because ovn-controller would
likely be waking up constantly due to southbound database changes,
handling CLI commands, or other activity. However, in one of Red Hat
QE's tests, they were seeing ovn-controller take 10 seconds between
when it would start up and when OF flows were installed. This was
because the only thing waking ovn-controller up was regularly-scheduled
probe intervals with the southbound database.

To fix this, we call rconn_run_wait() and rconn_recv_wait() even in
the case when the rconn is not connected. This way, if we end up in a
state other than ACTIVE or IDLE, we can handle traffic from the rconn
when it arrives.

Fixes: e9e716a ("controller: Don't artificially limit group and
meter IDs to 16bit.")

Reported-at: https://issues.redhat.com/browse/FDP-357
Signed-off-by: Mark Michelson <[email protected]>
Acked-by: Dumitru Ceara <[email protected]>
Signed-off-by: Mark Michelson <[email protected]>
  • Loading branch information
putnopvut authored and dceara committed Feb 12, 2024
1 parent f27be65 commit 784a5e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/features.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ ovs_feature_get_openflow_cap(const char *br_name)

rconn_run(swconn);
if (!rconn_is_connected(swconn)) {
rconn_run_wait(swconn);
rconn_recv_wait(swconn);
return false;
}

Expand Down

0 comments on commit 784a5e7

Please sign in to comment.