]> git.proxmox.com Git - mirror_ovs.git/commit - vswitchd/bridge.c
ifnotifier: do not wake up when there is no db connection
authorThadeu Lima de Souza Cascardo <cascardo@redhat.com>
Tue, 25 Oct 2016 17:44:43 +0000 (15:44 -0200)
committerBen Pfaff <blp@ovn.org>
Mon, 31 Oct 2016 18:11:06 +0000 (11:11 -0700)
commit0612d7393fc6e04ecb976c2b999624aad607f8f3
treee94cec63f6a936fb9724f10ef4e0916d158c49b7
parent01dee7de6661bb2cd5ff20085dbfb7c1d8084d01
ifnotifier: do not wake up when there is no db connection

When bridge uses the interface notifier, it wakes up until a reconfiguration
takes place. However, if there is no connection or a lock contention to the
database, the check for reconfiguration will not take place.

This uses a seq and only seq_wait when checking for the interfaces change.

This is easily reproduced by starting ovs-vswitchd without starting
ovsdb-server, and then creating a new system interface, like using
'ip link add type veth'. ovs-vswitchd will then consume 100% CPU.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
vswitchd/bridge.c