-
Bug
-
Resolution: Done
-
Medium
-
None
-
None
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:
- Create a port on OVS - sudo ovs-vsctl add-port br-int test1
- Check operational DS to make sure port is present
- Delete and add in same command: sudo ovs-vsctl --if-exists del-port br-int test1 – add-port br-int test1
- Check operational DS, port will be no longer present.