Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connmgr: Fix ofconn configuration on vswitchd startup.
ofconn connection parameters, such as probe_interval and max_backoff, are always set to their default values when vswitchd starts up even if the user has configured these to be something different in ovsdb: $ ovs-vsctl set controller UUID inactivity_probe=9000 $ journalctl -u ovs-vswitchd.service | grep "inactivity" ovs|10895|rconn|DBG|dp1<->tcp:127.0.0.1:6653: idle 9 seconds, sending inactivity probe $ systemctl restart openvswitch-switch.service $ journalctl -u ovs-vswitchd.service | grep "inactivity" ovs|00848|rconn|DBG|dp1<->tcp:127.0.0.1:6653: idle 5 seconds, sending inactivity probe This bug was introduced by commit a0baa7d (connmgr: Make treatment of active and passive connections more uniform.). This happens because ofservice_reconfigure() loops over each ofconn in ofservice->conns and calls ofconn_reconfigure() on it to set the configuration parameters, however when ofservice_reconfigure() is called from ofservice_create(), ofservice->conns hasn't been populated yet so ofconn_reconfigure() is never called. This commit moves the ofservice_reconfigure() call to ofconn_create() where ofservice->conns is populated. This commit also removes the hardcoded default values for inactivity_probe (5s) and max_backoff (8s) on initial creation of the ofservice, as these config values are available from the ofproto_controller struct c. Signed-off-by: Brad Cowie <[email protected]> Acked-by: Eelco Chaudron <[email protected]> Signed-off-by: Simon Horman <[email protected]>
- Loading branch information