[OVSDB-445] Port creation doesn't reflect in operational Created: 04/Jan/18  Updated: 21/Mar/18  Resolved: 21/Mar/18

Status: Verified
Project: ovsdb
Component/s: Southbound.Open_vSwitch
Affects Version/s: None
Fix Version/s: Oxygen

Type: Bug Priority: Medium
Reporter: Vishal Thapar Assignee: Vishal Thapar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 2 days
Time Spent: Not Specified
Original Estimate: 2 days


 Description   

When a port is deleted and recreated in same command, it doesn't reflect in operational. If it was present earlier, it ends up getting deleted. Openstack  [Nova] from Newton onwards unplugs/plugs all VM ports when nova compute is restarted. This results in a call something like this:

ovs-vsctl --timeout=120 – --if-exists del-port vhu97ed12fa-9d – add-port br-int vhu97ed12fa-9d – set Interface vhu97ed12fa-9d external-ids:iface-id=97ed12fa-9d4b-41e3-847e-62307cd964f1 external-ids:iface-status=active external-ids:attached-mac=fa:16:3e:ea:2f:7d external-ids:vm-uuid=c5ea17fa-2e52-442f-a112-4a062ba76377 type=dpdkvhostuser

This results in port getting deleted and added in same JSON msg from OVS to ODL. In OvsdbTransactCommandAggregator for all resources we process add/udpates and then deletes. This means delete is processed after add and we end up deleting it.

This will happen any time a command similar to above is used.

Steps to reproduce:

  1. Create a port on OVS - sudo ovs-vsctl add-port br-int test1
  2. Check operational DS to make sure port is present
  3. Delete and add in same command:  sudo ovs-vsctl --if-exists del-port br-int test1 – add-port br-int test1
  4. Check operational DS, port will be no longer present.

 



 Comments   
Comment by Vishal Thapar [ 04/Jan/18 ]

Fix: https://git.opendaylight.org/gerrit/66862

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