[OVSDB-421] Tunnel_ips of hardware_vtep is cleared when Open vSwitch process restarted in Open vSwitch HWVTEP Emulator Created: 21/Jul/17  Updated: 30/Oct/17  Resolved: 28/Aug/17

Status: Resolved
Project: ovsdb
Component/s: Southbound.hw_vtep
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Ran Xiao Assignee: Vishal Thapar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: File karaf.log.gz     Text File ovsdb-server.log    
External issue ID: 8874

 Description   

Issue:
Tunnel_ips of hardware_vtep is cleared when Open vSwitch process restarted in Open vSwitch HWVTEP Emulator.

Tunnel_ips is cleared when ovsdb-server connects to ODL.

Details:
In one L2GW Node(with HA setting) environment, restart Open vSwitch process after GW/CONNECTION creation : 5 / 5 times happened
In one L2GW Node(without HA setting) environment, restart Open vSwitch process after GW/CONNECTION creation : 0 / 5 times happened

Reproduction Steps
1.Initialization
1.1 Initialize ODL
Delete snapshots, journal, data folders
Start ODL
Install feature
1.2 Set OVS in Controller/Compute Node to connect ODL
1.3 Create Network
1.4 Initialize L2GW Node and connect to ODL
1.5 Create GW/CONNECTION
2.L2GW Node process
ovsdb-client dump hardware_vtep > /tmp/before
ps -ef|grep ovs-vtep | grep -v grep | awk '

{print "kill "$2}

' | sh
pkill ovs-vswitchd
pkill ovsdb-server
ovs-dpctl del-flows system@ovs-system
ps -ef | grep ovs | grep -v grep
ps -ef | grep -v '[' | grep -v grep
3.Start L2GW Node process
vtep=10.0.0.50
ovsdb-server --pidfile --detach --log-file \
-vsyslog:dbg -vfile:dbg \
--remote=punix:/var/run/openvswitch/db.sock \
--remote=db:hardware_vtep,Global,managers \
--remote=ptcp:6632 /etc/openvswitch/ovs.db /etc/openvswitch/vtep.db
ovsdb-client dump hardware_vtep > /tmp/after-1
sleep 1
ovsdb-client dump hardware_vtep > /tmp/after-2
sleep 1
ovsdb-client dump hardware_vtep > /tmp/after-3
sleep 1
ovsdb-client dump hardware_vtep > /tmp/after-4

LOG Info:
The following logs are collected for environment of L2GW Node with HA setting.
karaf.log
ovsdb-server.log

Investigation:
We found the tunnel_ips setting requests log in ovsdb-server.log:
2017-07-18T06:26:14.968Z|00062|jsonrpc|DBG|tcp:172.16.1.30:6640: received request, method="transact", params=["hardware_vtep",{"where":[["name","==","ocata-l2gw1"]],"table":"Physical_Switch","op":"update","row":{"tunnel_ips":["set",[]]}},

{"comment":"Physical Switch: Updating ocata-l2gw1","op":"comment"}

], id="f219d330-cc99-4bd0-bfed-ace6878bc80e"
2017-07-18T06:26:14.968Z|00063|jsonrpc|DBG|tcp:172.16.1.30:6640: send notification, method="update", params=["ec3f9930-be2f-4d4d-91ea-1b9c042b9c16",{"Physical_Switch":{"36939d13-f767-4385-bd37-b4829611fd5b":{"new":

{"_version":["uuid","415b5777-3122-4157-bff0-0c282fdc06a4"],"name":"ocata-l2gw1","description":"OVS VTEP Emulator","other_config":["map",[]],"switch_fault_status":["set",[]],"management_ips":["set",[]],"tunnels":["uuid","5e77e08c-68d6-4e9c-bdfe-e052446b52b8"],"ports":["uuid","7b986670-e6e8-4209-b157-369d6a107137"],"_uuid":["uuid","36939d13-f767-4385-bd37-b4829611fd5b"],"tunnel_ips":["set",[]]}

,"old":{"_version":["uuid","b866dc9f-a024-4b30-8d64-ab397ef62bd4"],"tunnel_ips":"10.0.0.50"}}}}]

And found the following log about information update has been raised from OVS in karaf.log
2017-07-18 15:26:15,201 | TRACE | entLoopGroup-5-1 | HwvtepMonitorCallback | 292 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.4.1.SNAPSHOT | result: TableUpdates [map={Physical_Switch=TableUpdate [{36939d13-f767-4385-bd37-b4829611fd5b=RowUpdate [uuid=36939d13-f767-4385-bd37-b4829611fd5b, oldRow=Row [columns=

{tunnel_ips=[tunnel_ips=[10.0.0.50]], _version=[_version=b866dc9f-a024-4b30-8d64-ab397ef62bd4]}

], newRow=Row [columns={tunnels=[tunnels=[5e77e08c-68d6-4e9c-bdfe-e052446b52b8]], tunnel_ips=[tunnel_ips=[]], other_config=[other_config={}], management_ips=[management_ips=[]], name=[name=ocata-l2gw1], description=[description=OVS VTEP Emulator], _uuid=[_uuid=36939d13-f767-4385-bd37-b4829611fd5b], ports=[ports=[7b986670-e6e8-4209-b157-369d6a107137]], _version=[_version=415b5777-3122-4157-bff0-0c282fdc06a4], switch_fault_status=[switch_fault_status=[]]}]]}]}, error=null, details=null, getError()=null, getDetails()=null, getClass()=class org.opendaylight.ovsdb.lib.message.TableUpdates, hashCode()=1554159592, toString()=org.opendaylight.ovsdb.lib.message.TableUpdates@5ca297e8] dbSchema: hardware_vtep



 Comments   
Comment by Ran Xiao [ 21/Jul/17 ]

Attachment karaf.log.gz has been added with description: Karaf log

Comment by Ran Xiao [ 21/Jul/17 ]

Attachment ovsdb-server.log has been added with description: ovsdb log

Comment by Ran Xiao [ 25/Jul/17 ]

Cause of this issue:
After Open vSwitch process restarted, ODL attempts to acquire tunnel_ips from CONFIGURATION MD-SAL and set it to Physical Switch.
As tunnel_ips is not set from ODL but is set by vtep-ctl command, it does not exist in CONFIGURATION MD-SAL.
This caused an empty value is set to tunnel_ips for Physical Switch.

Proposal:
Let ODL to acquire tunnel_ips from OPERATIONAL MD-SAL after VTEP Emulator restarted.

Comment by Ran Xiao [ 25/Jul/17 ]

Pushed the following patch. Waiting for review.
60711<https://git.opendaylight.org/gerrit/#/c/60711/>

Generated at Wed Feb 07 20:36:21 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.