Comment 7 for bug 1494114

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I think I got it. This is what happens:

a) the test wants to add the router interface
b) a db deadlock happens during _add_csnat_router_interface_port in l3_dvr_db [1]
c) the API layer issues a retry on db deadlock
d) the operation 'add_router_interface' fails on [2], because we have not rolled back the operation that initially succeeded in the first pass (the method body is not within a single subtransaction).

So in a nutshell the Bad Request is masking the deadlock: the retry is happening on inconsistent state. Vive l'atomicité!!!

[1] https://github.com/openstack/neutron/blob/master/neutron/db/l3_dvr_db.py#L325
[2] https://github.com/openstack/neutron/blob/master/neutron/db/l3_dvr_db.py#L312