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

commit cec1808050495aa43a2b67058077063bf3b6f4ed
Author: Matt Riedemann <mriedem...@gmail.com>
Date:   Wed Apr 3 11:35:37 2019 -0400

    Drop migrate_keypairs_to_api_db data migration
    
    This was added in Newton:
    
      I97b72ae3e7e8ea3d6b596870d8da3aaa689fd6b5
    
    And was meant to migrate keypairs from the cell
    (nova) DB to the API DB. Before that though, the
    keypairs per instance would be migrated to the
    instance_extra table in the cell DB. The migration
    to instance_extra was dropped in Queens with change:
    
      Ie83e7bd807c2c79e5cbe1337292c2d1989d4ac03
    
    As the commit message on ^ mentions, the 345 cell
    DB schema migration required that the cell DB keypairs
    table was empty before you could upgrade to Ocata.
    
    The migrate_keypairs_to_api_db routine only migrates
    any keypairs to the API DB if there are entries in the
    keypairs table in the cell DB, but because of that blocker
    migration in Ocata that cannot be the case anymore, so
    really migrate_keypairs_to_api_db is just wasting time
    querying the database during the online_data_migrations
    routine without it actually migrating anything, so we
    should just remove it.
    
    Change-Id: Ie56bc411880c6d1c04599cf9521e12e8b4878e1e
    Closes-Bug: #1822613


** 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/1822613

Title:
  Inefficient queries inside online_data_migrations

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The online_data_migrations should be ran after an upgrade and contains
  a list of tasks to do to backfill information after an upgrade,
  however, some of those queries are extremely inefficient which results
  in this online data migrations taking an unacceptable period of time.
  The SQL query that takes a really long time in question:

  > SELECT count(*) AS count_1
  > FROM (SELECT instance_extra.created_at AS instance_extra_created_at,
  > instance_extra.updated_at AS instance_extra_updated_at,
  > instance_extra.deleted_at AS instance_extra_deleted_at,
  > instance_extra.deleted AS instance_extra_deleted, instance_extra.id AS
  > instance_extra_id, instance_extra.instance_uuid AS
  > instance_extra_instance_uuid
  > FROM instance_extra
  > WHERE instance_extra.keypairs IS NULL AND instance_extra.deleted = 0) AS 
anon_1

  It would also be good for us to *not* run a data migration again if we
  know we've already gotten found=0 when online_data_migrations is
  running in "forever-until-complete".  Also, the value of 50 rows per
  run in that mode is quite small.

  ref: http://lists.openstack.org/pipermail/openstack-
  discuss/2019-April/004397.html

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to