Hello,

Due to an unitialized script variable, we managed to create a bridge with an 
'empty' name. 

ovs-vsctl threw an error but the object was created nonetheless. I reproduced 
the error on different versions.
To avoid interference with our own code and environment settings, I installed 
2.6.1 on openSUSE Tumbleweed aarch64 (ARM64).

Expected behaviour: Don't create the bridge/port etc when parsing the object 
name throws an error.
When the datapath_type is also specified, OVS will start an infinite loop 
trying to add a port (?), increasing load to an extent that makes the system 
almost unresponsive. 
Yes, I'm aware these might be two separate issues.

-- Step 1: add the bridge with 'invalid' name.

localhost:~ # ovs-vsctl show
d819c3b2-3018-41e9-be86-3938717fb444
    ovs_version: "2.6.1"
localhost:~ # ovs-vsctl --may-exist add-br "" -- set bridge "" 
datapath_type=netdev
ovs-vsctl: Error detected while setting up ''.  See ovs-vswitchd log for 
details.
localhost:~ # ovs-vsctl show
d819c3b2-3018-41e9-be86-3938717fb444
    Bridge ""
        Port ""
            Interface ""
                type: internal
    ovs_version: "2.6.1"

As expected, the bridge name is also displayed as "" in the db, but you cannot 
work on it, for example, get bridge "" doesn't work.

-- Step 2: Check the log (default log level)

2017-02-03T10:38:07.487Z|00001|vlog|INFO|opened log file 
/var/log/openvswitch/ovs-vswitchd.log
2017-02-03T10:38:07.500Z|00002|ovs_numa|INFO|Discovered 4 CPU cores on NUMA 
node 0
2017-02-03T10:38:07.500Z|00003|ovs_numa|INFO|Discovered 1 NUMA nodes and 4 CPU 
cores
2017-02-03T10:38:07.501Z|00004|reconnect|INFO|unix:/var/run/openvswitch/db.sock:
 connecting...
2017-02-03T10:38:07.501Z|00005|reconnect|INFO|unix:/var/run/openvswitch/db.sock:
 connected
2017-02-03T10:38:07.526Z|00006|bridge|INFO|ovs-vswitchd (Open vSwitch) 2.6.1


2017-02-03T10:39:18.001Z|00007|memory|INFO|8144 kB peak resident set size after 
70.5 seconds
2017-02-03T10:39:18.058Z|00008|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports recirculation
2017-02-03T10:39:18.059Z|00009|ofproto_dpif|INFO|netdev@ovs-netdev: MPLS label 
stack length probed as 3
2017-02-03T10:39:18.059Z|00010|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports truncate action
2017-02-03T10:39:18.059Z|00011|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports unique flow ids
2017-02-03T10:39:18.059Z|00012|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports ct_state
2017-02-03T10:39:18.059Z|00013|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports ct_zone
2017-02-03T10:39:18.060Z|00014|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports ct_mark
2017-02-03T10:39:18.060Z|00015|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
supports ct_label
2017-02-03T10:39:18.060Z|00016|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath 
does not support ct_state_nat
2017-02-03T10:39:18.250Z|00017|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:18.251Z|00018|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:18.329Z|00019|bridge|INFO|bridge : using datapath ID 
0000a688c783dc4e
2017-02-03T10:39:18.331Z|00020|connmgr|INFO|: added service controller 
"punix:/var/run/openvswitch/.mgmt"
2017-02-03T10:39:18.368Z|00021|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:18.368Z|00022|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:18.515Z|00023|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:18.516Z|00024|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:18.602Z|00025|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:18.602Z|00026|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:18.701Z|00027|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:18.811Z|00028|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:18.925Z|00029|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:19.023Z|00030|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:19.124Z|00031|netdev|WARN|failed to set flags for network 
device : No such device
2017-02-03T10:39:19.124Z|00032|dpif|WARN|Dropped 4 log messages in last 1 
seconds (most recently, 0 seconds ago) due to excessive rate
...
2017-02-03T10:39:28.092Z|00061|memory|INFO|peak resident set size grew 659% in 
last 10.1 seconds, from 8144 kB to 61816 kB
2017-02-03T10:39:28.092Z|00062|memory|INFO|handlers:2 revalidators:2 rules:5
2017-02-03T10:39:28.125Z|00063|dpif|WARN|Dropped 9 log messages in last 1 
seconds (most recently, 0 seconds ago) due to excessive rate
2017-02-03T10:39:28.125Z|00064|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:29.086Z|00065|dpif|WARN|Dropped 8 log messages in last 1 
seconds (most recently, 0 seconds ago) due to excessive rate
2017-02-03T10:39:29.086Z|00066|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:30.101Z|00067|dpif|WARN|Dropped 8 log messages in last 1 
seconds (most recently, 0 seconds ago) due to excessive rate
2017-02-03T10:39:30.101Z|00068|dpif|WARN|netdev@ovs-netdev: failed to add  as 
port: No such device
2017-02-03T10:39:30.303Z|00069|netdev|WARN|Dropped 97 log messages in last 10 
seconds (most recently, 0 seconds ago) due to excessive rate
2017-02-03T10:39:30.303Z|00070|netdev|WARN|failed to set flags for network 
device : No such device


-- Step 3: Notice significant increase in system load.

This only applies when the datapath type is also specified with add-br.

localhost:~ # ps -C ovs-vswitchd -o start=
11:38:06
localhost:~ # uptime
 11:40am  up 1 day 15:49,  4 users,  load average: 1.24, 0.41, 0.14

Cleaning up is possible and system load goes back to normal:

localhost:~ # ovs-vsctl del-br ""
localhost:~ # ovs-vsctl show
d819c3b2-3018-41e9-be86-3938717fb444
    ovs_version: "2.6.1"
localhost:~ #

best regards
Gabor
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to