The transaction context is currently not shared when creating the
RequestSpec, BuildRequest and InstanceMapping. Because of this,
it is possible that the database ends in an inconsistent state
due to the fact that one of these was created and the system
crashed afterwards.
This patch adds a function which handles the creation of all those
resources in a single transaction.
Co-Authored-By: melanie witt <melwittt@gmail.com>
Closes-Bug: #1784093
Conflicts:
nova/tests/unit/compute/test_compute_api.py
NOTE(melwitt): The conflict is because change
Iaffbb019fef7779e7fa44306aacca954512b6970 is not in Rocky.
The difference in the test is because change
I7f5f08691ca3f73073c66c29dddb996fb2c2b266 is not in Rocky.
Change-Id: If897a0d721180152ebdceb7a0c23e8f283ce6d10
(cherry picked from commit 85f8d033d2)
(cherry picked from commit 870e5bcfb6)