]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
VMWare NSXv: id fields should be nullable
authorKobi Samoray <ksamoray@vmware.com>
Wed, 18 Feb 2015 17:25:27 +0000 (19:25 +0200)
committerKobi Samoray <ksamoray@vmware.com>
Wed, 18 Feb 2015 17:25:27 +0000 (19:25 +0200)
commit54d67bac7dc128c348372a9c411316afe2d1507e
treea5f8e4313db98c799fc91d3e4df7a2af3f68087c
parentc80b13f59f6e8af816978ad8383609d6e5fcb134
VMWare NSXv: id fields should be nullable

To handle concurrency issues when two neutron nodes initialize at the same
time, we use the following solution:
- Each neutron node attempts to create a record with id value=NULL
- One which inserts successfully, resumes to create the resource and once
the resource is created, it updates its id in the database
- One which fails with duplicate entry exception, busy-waits until the id
field is populated, of terminates on timeout.

Relevant resources are internal edges, and internal networks.

To implement the above, id fields should be nullable.

Change-Id: Iff94678ab341ccb1310d6b6efc53a52bd3bb9240
Partially-Implements: blueprint vmware-nsx-v
neutron/db/migration/alembic_migrations/versions/4dbe243cd84d_nsxv.py
neutron/plugins/vmware/dbexts/nsxv_models.py