We found the following issue when running test with ODL Carbon SR2.
In conntrack mode, SNAT communication fails if route gateway is set before virtual NW creation or VM creation in a fresh environment.
The following WARN karaf log message shows when configuring router gateway and interface.
2017-10-24 10:09:47,079 | WARN | nPool-1-worker-0 | ExternalNetworksChangeListener | 369
org.opendaylight.netvirt.natservice-impl - 0.4.2.Carbon | associateExternalNetworkWithVPN :
primary napt Switch not found for router Uuid [_value=e81d29f5-19cb-412b-aa7e-4c9377e00ee4] on dpn: 0
2017-10-24 10:11:10,857 | WARN | eChangeHandler-0 | AbstractSnatService | 369
org.opendaylight.netvirt.natservice-impl - 0.4.2.Carbon | getTunnelInterfaceName :
RPC Call to getTunnelInterfaceId returned with Errors []
○Possible cause
By checking both OVS and ODL logs, we think that the cause might be as follows
It seems that in controller node the patch ports of br-int br-ex are created when creating the first virtual NW.
And in compute node, the patch ports are created when creating the first VW in this node.
The processes are not finished correctly when router gateway is set before patch ports are created on each node.
○Reproduction steps:
1. neutron-server and related agent restart (controller node)
2. OVS initialization (controller node and compute node)
3. ODL initialization (all 3 odl nodes)
4. ODL 3 node cluster start
5. OVS configuration (controller node and compute node)
6. External NW creation, External NW subnet creation
7. Virtual NW creation
8. Router creation
9. Router GW configuration
10. Router IF configuration
11. VM creation
SNAT communication confirm
12. All resources deletion
13. OVS stop (controller node and compute node)
14. ODL stop
○log files
We will upload them if necessary.