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.
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 85f8d033d27b31a6398529e0a25da74eae523b08)
(cherry picked from commit 870e5bcfb6a5243a785b66353dda299286274e59)
Reviewed: https:/ /review. opendev. org/656030 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=dc0ded897b5 e5df89166c318f8 bed3dbb6553fce
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit dc0ded897b5e5df 89166c318f8bed3 dbb6553fce
Author: Mohammed Naser <email address hidden>
Date: Fri Jul 27 21:09:22 2018 -0400
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 <email address hidden>
Closes-Bug: #1784093
Conflicts: tests/unit/ compute/ test_compute_ api.py
nova/
NOTE(melwitt): The conflict is because change f7779e7fa44306a acca954512b6970 is not in Rocky. a3f73073c66c29d ddb996fb2c2b266 is not in Rocky.
Iaffbb019fe
The difference in the test is because change
I7f5f08691c
Change-Id: If897a0d7211801 52ebdceb7a0c23e 8f283ce6d10 6398529e0a25da7 4eae523b08) a785b66353dda29 9286274e59)
(cherry picked from commit 85f8d033d27b31a
(cherry picked from commit 870e5bcfb6a5243