← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1790701] Re: online_data_migrations fail in rocky+

 

Reviewed:  https://review.openstack.org/599744
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=63c10d2d536c3ffed68ccfb6bd393f317111d903
Submitter: Zuul
Branch:    master

commit 63c10d2d536c3ffed68ccfb6bd393f317111d903
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Tue Sep 4 14:53:25 2018 -0400

    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


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1790701

Title:
  online_data_migrations fail in rocky+

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) rocky series:
  In Progress

Bug description:
  # nova-manage --debug db online_data_migrations 
  Running batches of 50 until complete
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters [req-73eac47f-96f5-4393-8104-80d64e4f281f - - - - -] DBAPIError exception wrapped from (psycopg2.ProgrammingError) relation "projects" does not exist
  LINE 2: FROM projects 
               ^
   [SQL: 'SELECT projects.id \nFROM projects \nWHERE projects.external_id = %(external_id_1)s'] [parameters: {'external_id_1': '00000000-0000-0000-0000-000000000000'}] (Background on this error at: http://sqlalche.me/e/f405): psycopg2.ProgrammingError: relation "projects" does not exist
  LINE 2: FROM projects 
               ^
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters   File "/usr/lib64/python3.5/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters     context)
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters   File "/usr/lib64/python3.5/site-packages/sqlalchemy/engine/default.py", line 507, in do_execute
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters     cursor.execute(statement, parameters)
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters psycopg2.ProgrammingError: relation "projects" does not exist
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters LINE 2: FROM projects 
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters              ^
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters 
  2018-09-04 13:39:12.628 15100 ERROR oslo_db.sqlalchemy.exc_filters 
  Error attempting to run <function create_incomplete_consumers at 0x7fe62f7d19d8>
  +---------------------------------------------+--------------+-----------+
  |                  Migration                  | Total Needed | Completed |
  +---------------------------------------------+--------------+-----------+
  |         create_incomplete_consumers         |      0       |     0     |
  | delete_build_requests_with_no_instance_uuid |      0       |     0     |
  |      migrate_instances_add_request_spec     |      0       |     0     |
  |          migrate_keypairs_to_api_db         |      0       |     0     |
  |       migrate_quota_classes_to_api_db       |      0       |     0     |
  |        migrate_quota_limits_to_api_db       |      0       |     0     |
  |          migration_migrate_to_uuid          |      0       |     0     |
  |     populate_missing_availability_zones     |      0       |     0     |
  |          populate_queued_for_delete         |      0       |     0     |
  |                populate_uuids               |      0       |     0     |
  |     service_uuids_online_data_migration     |      0       |     0     |
  +---------------------------------------------+--------------+-----------+

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1790701/+subscriptions


References