[OVSDB-410] TerminationPoint reconciliation fails if one port is already present Created: 24/Apr/17 Updated: 30/Oct/17 Resolved: 26/Apr/17 |
|
| Status: | Resolved |
| Project: | ovsdb |
| Component/s: | Southbound.Open_vSwitch |
| Affects Version/s: | unspecified |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Vishal Thapar | 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 |
||
| External issue ID: | 8280 |
| Description |
|
TerminationPoint reconciliation has a bug where reconciliation can fail if even one port doesn't require reconciliation. The issue is with TerminationPointCreateCommand, which checks if TerminationPoint already exists in operational or not. It seems to be failing for ports that already exist and we end up reconciling ports that are already present. However, trying to create a port that already exists results in constraint violation error: { "error": "constraint violation", "details": "Transaction causes multiple rows in \"Interface\" table to have identical values (\"tun21435b8e5dd\") for index on column \"name\". First row, with UUID fdb4afd2-9877-42bb-9dac-c35e96b3de6d, existed in the database before this transaction and was not modified by the transaction. Second row, with UUID 63d879a2-77fb-4401-9ee0-d2861791c192, was inserted by this transaction." }A failure in any of operations in a transaction results in all other operations also failing. This means operations to add rest of the ports fail and they never get reconciled. Steps to reproduce: 1. Create two tunnel interfaces through OVSDB plugin. Expected behavior: Actual behavior: If first port is deleted, it will not throw constraint violation, but second one will. |
| Comments |
| Comment by Vishal Thapar [ 24/Apr/17 ] |
|
The issue is in TerminationPointConfigReconciliationTask.java, Line 57: @Override }; We're initializing BridgeOperationalState always as empty. In TerminationPointCreate when we check if TP exists in operational or not: it always returns absent, so we end up reconciling ports that are already present in operational datastore. This looks like an artifact of earlier version of the patch [1] where Bridge reconciliation was taking are of TPs too, or probably some pending code that never got in. If testing was done by deleting all ports, it this issue won't be hit. I'm working on a fix, will be pushing soon. Question: Should this be termed critical? As it stands, reconciliation of ports is currently broken in all branches. |
| Comment by Vishal Thapar [ 24/Apr/17 ] |
|
Marking it as blocker as per discussion with Sam in IRC, as I see this issue even on single node. Patches |