DB deadlocks on simultaneous port creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Oleg Bondarev |
Bug Description
This was observed during tests on environment with several controllers: when a routers with gateways and subnets are created at a high rate, sometimes port creation for router gateway may fail with DBDeadlock. In several cases that I investigated I found that deadlock happens when router port is created in parallel with dhcp port(s) creation on other servers. Generally we have simultaneous port creation. Port creation involves locking 'ports' and 'binding' tables: get_locked_
port = (session.
binding = (session.
Also there are locks during ip allocation for the port.
I'm not sure how exacly this may lead to deadlock. It may probably happen due to specifics of Galera working in active-active
mode: throwing deadlock errors when it fails to validate a change with other members of the cluster.
Examples of tracebacks:
http://
http://
Changed in neutron: | |
milestone: | none → liberty-3 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | liberty-3 → 7.0.0 |
I'm going to apply fix similar to https:/ /review. openstack. org/#/c/ 180466/. Though it's more a workaround, it should fix the issue with the only downside of a slight delay in port creation in a very rare circumstances.