nova/nova
Matt Riedemann 63c10d2d53 Configure placement DB context manager for nova-manage/status
The create_incomplete_consumers online data migration was added in
Rocky via change Id609789ef6b4a4c745550cde80dd49cabe03869a. That
relies on hitting some tables in the API (or placement) database.
The DB API code for that migration relies on a placement context
manager which looks like it was regressed with change
I2fff528060ec52a4a2e26a6484bdf18359b95f77 (also in Rocky). This
results in a DB error trying to query the projects table but
because of a generic try/except in _run_migration, the failure
was missed in CI testing.

Similarly, the nova-status upgrade check "_check_resource_providers"
routine also uses the placement DB API context manager to count the
number of compute resource providers in the API (or placement) DB,
which is returning 0 because it's not using the proper DB connection.
This was not caught in the nova-status CLI tests because they use
the DatabaseFixture which *does* configure the global placement DB
API context manager.

This adds the configuration of the global placement DB API context
manager so we can properly query the placement-related tables.
The blanket problematic try/except from _run_migration is left
as-is in this change but will be addressed in a separate patch.

Integration testing of this fix is being performed with devstack:

  https://review.openstack.org/599847/

Change-Id: I9d97b7a904e2b7d15c763e2a067cc5909cc6c9c5
Closes-Bug: #1790701
Closes-Bug: #1790721
2018-09-05 10:29:48 -04:00
..
api Merge "Fix race condition in reshaper handler" 2018-08-30 17:35:09 +00:00
cells Add instance action record for snapshot instances 2017-12-11 17:46:38 +08:00
cmd Configure placement DB context manager for nova-manage/status 2018-09-05 10:29:48 -04:00
common
compute Merge "Combine error handling blocks in _do_build_and_run_instance" 2018-09-04 16:56:45 +00:00
conductor Merge "In Python3.7 async is a keyword [1]" 2018-08-03 00:58:06 +00:00
conf Merge "Make instance_list perform per-cell batching" 2018-08-28 04:55:17 +00:00
console Use nova.db.api directly 2018-07-10 14:56:27 +00:00
consoleauth
db Revert "Don't use '_TransactionContextManager._async'" 2018-08-28 17:18:51 +01:00
hacking Use nova.db.api directly 2018-07-10 14:56:27 +00:00
image Implement certificate_utils 2018-06-12 14:44:32 -04:00
ipv6
keymgr
locale Imported Translations from Zanata 2018-08-12 07:33:01 +00:00
network Handle binding_failed vif plug errors on compute restart 2018-08-09 16:26:53 -04:00
notifications Remove noisy DEBUG log 2018-08-23 16:57:51 +02:00
objects Merge "Delete instance_group_member records from API DB during archive" 2018-08-31 10:13:57 +00:00
pci network: update pci request spec to handle trusted tags 2018-05-31 13:55:40 -04:00
policies Remove the deprecated API extensions policies 2018-08-17 07:11:45 +00:00
privsep privsep: Handle ENOENT when checking for direct IO support 2018-08-27 17:03:46 +01:00
scheduler Merge "Report client: update_from_provider_tree w/reshape" 2018-08-31 18:51:46 +00:00
servicegroup Fix service list for disabled compute using MC driver 2018-08-14 14:11:22 +08:00
tests Configure placement DB context manager for nova-manage/status 2018-09-05 10:29:48 -04:00
virt Merge "libvirt: skip setting rx/tx queue sizes for not virto interfaces" 2018-09-03 18:40:47 +00:00
vnc
volume Remove unnecessary parameters from create volume API 2018-06-12 12:06:41 +05:30
__init__.py
availability_zones.py
baserpc.py
block_device.py Add uuid column to BlockDeviceMapping 2017-12-17 14:28:35 +00:00
cache_utils.py
config.py Configure placement DB context manager for nova-manage/status 2018-09-05 10:29:48 -04:00
context.py Stash the cell uuid on the context when targeting 2018-08-22 13:29:29 -07:00
crypto.py Convert certificate generation to processutils. 2018-05-02 19:18:41 +10:00
debugger.py
exception.py Compute: Handle reshaped provider trees 2018-08-28 14:05:24 -05:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py correct referenced url in comments 2018-01-18 09:16:37 +08:00
loadables.py
manager.py conf: Remove 'db_driver' config opt 2018-03-16 17:23:16 +00:00
policy.py
profiler.py
quota.py Merge "Avoid joins in _server_group_count_members_by_user" 2018-08-07 23:16:06 +00:00
rc_fields.py Nix unused raise_if_custom_resource_class_pre_v1_1 2018-06-18 19:52:45 +00:00
rpc.py Use oslo.messaging per-call monitoring 2018-06-11 14:44:10 -07:00
safe_utils.py
service.py Move conductor wait_until_ready() delay before manager init 2018-08-31 12:50:10 -07:00
service_auth.py Fix NoneType error when [service_user] is misconfigured 2017-11-28 12:22:30 -06:00
test.py (Re)start caching scheduler after starting computes in tests 2018-08-29 13:16:09 -04:00
utils.py Remove old check_attach version check in API 2018-08-29 16:26:25 -04:00
version.py
weights.py
wsgi.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00