database online data migration fail due to missing request spec marker
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Jack Ding | ||
Pike |
Fix Committed
|
Low
|
Matt Riedemann | ||
Queens |
Fix Committed
|
Low
|
Matt Riedemann | ||
Rocky |
Fix Committed
|
Low
|
Lee Yarwood |
Bug Description
Description
===========
During upgrade we run nova online migration that goes through the list of instances and creates a request spec record in the db if one does not exist. As the online migrations are batched, the request spec migration leaves a marker record in the request_specs table to indicate the last instance uuid that was processed. It continues processing starting from that instances on the next batch.
In our upgrade test, we hit a scenario where the marker instance from the online migration that was run during the Mitaka->Newton upgrade had been deleted and purged from the db by time we ran the Newton->Pike upgrade. This caused the online migration to fail as the marker instance couldn't be found.
Steps to reproduce
==================
- run data online migration on installed Newton load.
nova-manage db online_
- delete the instance referenced by the marker (instance_uuid 00000000-
- purge db:
nova-manage db purge
- upgrade to Pike.
Expected result
===============
Upgrade successful with no exceptions.
Actual result
=============
Exceptions occur during upgrade with missing marker an upgrade failed.
Error attempting to run <function migrate_
14 rows matched query service_
13 rows matched query migrate_
Error attempting to run <function migrate_
+------
| Migration | Total Needed | Completed |
+------
| delete_
| migrate_
| migrate_aggregates | 0 | 0 |
| migrate_
| migrate_flavors | 0 | 0 |
| migrate_
| migrate_
| migrate_
| migrate_
| migrate_
| migrate_
| service_
+------
description: | updated |
Changed in nova: | |
assignee: | nobody → Jack Ding (jackding) |
Changed in nova: | |
assignee: | Jack Ding (jackding) → Matt Riedemann (mriedem) |
Changed in nova: | |
assignee: | Matt Riedemann (mriedem) → Jack Ding (jackding) |
> In our upgrade test, we hit a scenario where the marker instance from the online migration that was run during the Mitaka->Newton upgrade had been deleted and purged from the db
Why/how was the instance marker record deleted? Since it's not owned by any real project/user someone shouldn't be able to list/show it in the API (except maybe an admin when listing servers for all tenants?).