The version_id isn't set during add_node() call. This function is called
when introspection starts for both "new" and existing node_info records.
As a result, race conditions can appear in an HA inspector deployment (see
the refered bug).
This patch makes sure a version_id is generated during the add_node() call
so stale record updates can be detected through the version_id mismatch
between the inspector memory and the DB record.
Reviewed: https:/ /review. openstack. org/507559 /git.openstack. org/cgit/ openstack/ ironic- inspector/ commit/ ?id=82000e48ecd aa5738f6a7e69d9 4386977e714493
Committed: https:/
Submitter: Zuul
Branch: master
commit 82000e48ecdaa57 38f6a7e69d94386 977e714493
Author: dparalen <email address hidden>
Date: Tue Sep 26 16:09:13 2017 +0200
Generate version_id upon add_node
The version_id isn't set during add_node() call. This function is called
when introspection starts for both "new" and existing node_info records.
As a result, race conditions can appear in an HA inspector deployment (see
the refered bug).
This patch makes sure a version_id is generated during the add_node() call
so stale record updates can be detected through the version_id mismatch
between the inspector memory and the DB record.
Change-Id: I422473e888e5e4 9abb3e598fc2cf2 f330620bdcd
Closes-Bug: #1719627