← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1696417] [NEW] nova-manage db online_data_migrations can fail when upgrading to newton under certain conditions

 

Public bug reported:

Reproduceable under conditions:

* Mitaka upgraded to Newton
* online_data_migrations have not yet migrated flavors and/or aggregates from the nova database, to the nova-api database
* One or more of the datetime-fields (created_at, updated_at, deleted_at) are set.
** Because a custom flavor has been created
** Because a flavor has been updated
** Because a flavor has been deleted (deleted flavors are probably not relevant, as the new table have no deleted flag, it just removes them altogether)

Steps to reproduce:

* Run 'nova-manage db online_data_migrations'

It throws an error message like:
Error attempting to run <function migrate_flavors at 0x488f398>

Workaround:

* Set created_at,updated_at and deleted_at to NULL
* Run migration


I have done quite a bit of troubleshooting, but haven't managed to write
a patch so far.  As far as I can tell, inserting a flavor or aggregate
to the new tables fail due to the datetime fields including a timezone.
There exists code for stripping away the timezone in
nova/db/sqlalchemy/api.py (convert_objects_related_datetimes) - but the
timezone reappears in nova/objects/flavor.py

** Affects: nova
     Importance: Undecided
         Status: New

-- 
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/1696417

Title:
  nova-manage db online_data_migrations can fail when upgrading to
  newton under certain conditions

Status in OpenStack Compute (nova):
  New

Bug description:
  Reproduceable under conditions:

  * Mitaka upgraded to Newton
  * online_data_migrations have not yet migrated flavors and/or aggregates from the nova database, to the nova-api database
  * One or more of the datetime-fields (created_at, updated_at, deleted_at) are set.
  ** Because a custom flavor has been created
  ** Because a flavor has been updated
  ** Because a flavor has been deleted (deleted flavors are probably not relevant, as the new table have no deleted flag, it just removes them altogether)

  Steps to reproduce:

  * Run 'nova-manage db online_data_migrations'

  It throws an error message like:
  Error attempting to run <function migrate_flavors at 0x488f398>

  Workaround:

  * Set created_at,updated_at and deleted_at to NULL
  * Run migration


  I have done quite a bit of troubleshooting, but haven't managed to
  write a patch so far.  As far as I can tell, inserting a flavor or
  aggregate to the new tables fail due to the datetime fields including
  a timezone.  There exists code for stripping away the timezone in
  nova/db/sqlalchemy/api.py (convert_objects_related_datetimes) - but
  the timezone reappears in nova/objects/flavor.py

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


Follow ups