nova/nova/compute
Mohammed Naser dc0ded897b Create request spec, build request and mappings in one transaction
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)
2019-04-28 00:42:15 +00:00
..
monitors Remove translation of log messages 2017-06-09 09:06:16 +00:00
__init__.py Switch to using oslo_* instead of oslo.* 2015-02-06 06:03:10 -05:00
api.py Create request spec, build request and mappings in one transaction 2019-04-28 00:42:15 +00:00
build_results.py Compute Add build_instance hook in compute manager 2014-12-04 10:12:00 -05:00
cells_api.py Fix missing marker functions 2018-01-25 03:37:48 +00:00
claims.py [Trivial] docstrings, typos, minor refactoring 2017-08-28 08:33:58 -05:00
flavors.py Remove unused flavor_delete_info() method 2018-08-03 12:44:52 -04:00
instance_actions.py Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
instance_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
manager.py Merge "Don't warn on network-vif-unplugged event during live migration" into stable/rocky 2019-04-16 15:39:34 +00:00
migration_list.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
multi_cell_list.py Make nova list and migration-list ignore down cells 2018-06-25 17:28:57 -04:00
power_state.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00
provider_tree.py Add method to get cpu traits 2018-07-24 12:37:46 +00:00
resource_tracker.py Fix resource tracker updates during instance evacuation 2019-03-05 19:22:14 +08:00
rpcapi.py Make compute rpcapi version calculation check all cells 2018-12-13 16:10:05 +00:00
stats.py Change consecutive build failure limit to a weigher 2018-06-06 15:18:50 -07:00
task_states.py Fix resource tracker updates during instance evacuation 2019-03-05 19:22:14 +08:00
utils.py Heal RequestSpec.is_bfv for legacy instances during moves 2018-07-23 12:24:10 -04:00
vm_states.py Removed enum duplication from nova.compute 2016-09-02 07:30:44 +00:00