[OVSDB-302] CSIT southbound-all tests failing because hwvtep and southbound are both enabled Created: 16/Feb/16 Updated: 30/Oct/17 Resolved: 04/Mar/16 |
|
| Status: | Resolved |
| Project: | ovsdb |
| Component/s: | Southbound.hw_vtep |
| Affects Version/s: | unspecified |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Sam Hague | 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 |
||
| Attachments: |
|
| External issue ID: | 5366 |
| Description |
|
The below exception comes out during the southbound-all tests. Code was added to allow both the southbound and hwvtepsouthbound to be running at the same time. Each southbound would ignore schemas it did not care about, but the hwvtep is complaining about the open_vswtich schema - which is shouldn't. 2016-02-16 17:44:47,126 | WARN | pool-30-thread-1 | HwvtepConnectionInstance | 406 - org.opendaylight.ovsdb.hwvtepsouthbound-impl - 1.2.1.Beryllium | Exception attempting to createTransactionInvokers ConnectionInfo [_localIp=IpAddress [_ipv4Address=Ipv4Address [_value=10.30.11.166], _value=[1, 0, ., 3, 0, ., 1, 1, ., 1, 6, 6]], _localPort=PortNumber [_value=6640], _remoteIp=IpAddress [_ipv4Address=Ipv4Address [_value=10.30.11.8], _value=[1, 0, ., 3, 0, ., 1, 1, ., 8]], _remotePort=PortNumber [_value=55870], augmentation=[]]: java.util.concurrent.ExecutionException: org.opendaylight.ovsdb.lib.error.ParsingException: bad DatabaseSchema root, expected "tables" as child but was not found io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)[99:io.netty.transport:4.0.33.Final] |
| Comments |
| Comment by Sam Hague [ 16/Feb/16 ] |
|
Attachment karaf.log has been added with description: karaf.log |
| Comment by Sam Hague [ 16/Feb/16 ] |
|
https://jenkins.opendaylight.org/releng/job/ovsdb-csit-1node-southbound-all-beryllium/802/ |
| Comment by Vishal Thapar [ 18/Feb/16 ] |
|
This exception is being logged from code that tries to register txInvokers. It tries to get hwvtep schema and if not found logs this warning msg. Code can be improved to not require stack trace when hwvtep schema is not present. I believe similar fix will be needed in OvsdbConnectionManager too as this will happen in cases where both are enabled but hwvtep is the only schema available. I'll come up with a fix for this and then can discuss it in the gerrit patch. |
| Comment by Vishal Thapar [ 18/Feb/16 ] |
| Comment by Vishal Thapar [ 26/Feb/16 ] |
|
Alright, looks like we need to revisit this as fix is not working as expected. First, let us talk about the problem seen in original bug. This is the code that we have in OVSDB/HWvtep ConnectionManager for passive connections [note: issue is only with passive connections, only change added in fix was the if statement]. if(externalClient.getSchema(SouthboundConstants.OPEN_V_SWITCH) != null) { OvsdbConnectionInstance client = connectedButCallBacksNotRegistered(externalClient); // Register Cluster Ownership for ConnectionInfo registerEntityForOwnership(client); }Looking at these trace entries: The exception is happening at client.getSchema("hardware_vtep"), exactly the sort of code we added in if condition. Funny thing is, if you look further down stack trace it is coming from registerEntityForOwnership() while exact same call [getSchema] is also present in connectedButCallBacksNotRegistered(). So why didn't we run into it earlier? Secondly, the issue seen post fix is this: Basically, even attempting to get non-existent schema from a node screws up ConnectionService. Looks like that thread just abandons ship and disappears. Thirdly, I add try catch around the if statements and changed it to externalClient.getSchema(SouthboundConstants.OPEN_V_SWITCH).get() When I do this I don't even hit the catch. I am not familiar with how library code works with all the ListenableFutures, but one way could be to get the schemas/dbs present on device at connect itself and once we get that only then call the listeners. This way when conenctionManager.connected() is called we don't need to fetch DB/schema from the device. |
| Comment by Vishal Thapar [ 26/Feb/16 ] |
|
This patch https://git.opendaylight.org/gerrit/#/c/35478/ seems to work fine. Could anyone explain why this works and previous one didn't? |
| Comment by Vishal Thapar [ 04/Mar/16 ] |
|
Fixed by https://git.opendaylight.org/gerrit/35478 and verified. |