Tunnel I/F is not created in L2GW(OVS HWVTEP Emulator) LogicalSwitch sometimes when network / subnet / GATEWAY / CONNECTION are created continuously by CLI with shell script.
By confirmed several times, we found that the probability of successful tunnel I/F creation will increase if sleep time is added.
Below are results after adding sleep time in each step respectively.
* Results of set sleep time in different steps (5 loops executed for each pattern)
pattern OK NG
--------------------------------------------------
no sleep 0 5
sleep set point(*1) 2 3
sleep set point(*2) 0 5
sleep set point(*3) 0 5
sleep set point(*4) 0 5
sleep set point(*5) 2 3(*tunnel I/F created but ping failed)
sleep set point(*6) 0 5
sleep set point(*7) 0 5
--OK: Tunnel I/F created, Ping also OK
--NG: Tunnel I/F not created, Ping failed
○Reproduction steps:
1. OpenDaylight / Open vSwitch Initialization (no entry in openstack)
Controller node Open vSwitch start and initial setting
* sleep set point(*1) 5s
2. L2GW node Open vSwitch start
* sleep set point(*2) 5s
3. L2GW node Open vSwitch initial setting (Non-HA)
* sleep set point(*3) 5s
4. Network / Subnet / L2 GATEWAY / L2 CONNECTION creation
openstack network create test-nw
* sleep set point(*4) 5s
openstack subnet create --network test-nw --dhcp --subnet-range 192.168.0.0/24 test-subnw
* sleep set point(*5) 5s
neutron l2-gateway-create gw --device name=ocata-l2gw1,interface_names=patch-vlan
* sleep set point(*5) 5s
neutron l2-gateway-connection-create gw test-nw --default-segmentation-id 1111
5. Ping confirmation
* sleep set point(*7) 5s
from: DHCP namespace, to: dummy port
6. Log and detail info collection
ovs-vsctl show
ovsdb-client dump hardware_vtep
/opt/karaf-0.7.1/data/log/karaf.log
curl -s -u admin:admin http://127.0.0.1:8080/restconf/config/network-topology:network-topology | python -mjson.tool