commit 72c57893f3f7b382d10c20b0db7a030bfa11be3b
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jun 20 10:53:43 2019 +0100
Maintenance task: Fix race condition at resource creation
When the maintenance task runs (every 5 minutes) it should take in
consideration how old is the resource before considering it to be an
inconsitency.
Prior to this patch, what could happen is that a resource being created
was committed to the neutron database but not yet to the OVN database and
ovn_revision_numbers cache table. In the meantime, the maintenance
task could run and create that resource before the create_*_postcommit()
completed resulting in a race condition.
Using a port as an example, the following error would be seeing when
that happens (more detailed example in the LP ticket):
ovsdbapp.backend.ovs_idl.transaction [-] OVSDB Error:
{"details":"Transaction causes multiple rows in \"Logical_Switch_Port\"
table to have identical values (\"89ebd403-68af-43a2-a4e4-5fa86d57d2a2\")
for index on column \"name\".
This patch adds a new filter to the get_inconsistent_resources() method
which checks the "created_at" column of the resource to see if it's older
than 60 seconds and ignore if it's newer.
Closes-Bug: #1833445
Change-Id: If157e9d4660cc6c566ecad44aa6734af2bd14db1
Signed-off-by: Lucas Alvares Gomes <email address hidden>
(cherry picked from commit 1e0c9370b23315d7e734cf5ebc960e76c454bb61)
Reviewed: https:/ /review. opendev. org/666826 /git.openstack. org/cgit/ openstack/ networking- ovn/commit/ ?id=72c57893f3f 7b382d10c20b0db 7a030bfa11be3b
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 72c57893f3f7b38 2d10c20b0db7a03 0bfa11be3b
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Jun 20 10:53:43 2019 +0100
Maintenance task: Fix race condition at resource creation
When the maintenance task runs (every 5 minutes) it should take in
consideration how old is the resource before considering it to be an
inconsitency.
Prior to this patch, what could happen is that a resource being created revision_ numbers cache table. In the meantime, the maintenance *_postcommit( )
was committed to the neutron database but not yet to the OVN database and
ovn_
task could run and create that resource before the create_
completed resulting in a race condition.
Using a port as an example, the following error would be seeing when
that happens (more detailed example in the LP ticket):
ovsdbapp. backend. ovs_idl. transaction [-] OVSDB Error: :"Transaction causes multiple rows in \"Logical_ Switch_ Port\" 68af-43a2- a4e4-5fa86d57d2 a2\")
{"details"
table to have identical values (\"89ebd403-
for index on column \"name\".
This patch adds a new filter to the get_inconsisten t_resources( ) method
which checks the "created_at" column of the resource to see if it's older
than 60 seconds and ignore if it's newer.
Closes-Bug: #1833445 c566ecad44aa673 4af2bd14db1 7e734cf5ebc960e 76c454bb61)
Change-Id: If157e9d4660cc6
Signed-off-by: Lucas Alvares Gomes <email address hidden>
(cherry picked from commit 1e0c9370b23315d