Comment 0 for bug 1715463

Revision history for this message
Ebbex (eb4x) wrote : binary name gets confused under upgrades of osapi_compute and metadata

During an upgrade, you'll already have a entry in the nova.services table for 'nova-osapi_compute'.

The new wsgi app has NAME='osapi_compute' and first queries for this name, which yields 0 rows.
Then since there's no entry it decides to create a new entry with INSERT where it appends 'nova-' to this 'name'. Problem is there's already an entry for 'nova-osapi_compute', so now the insert fails because of duplicate entries.

So NAME has to be changed, or append 'nova-' on both queries.

Also the queries

SELECT
if exists UPDATE
if not exists INSERT

Could really just boil down to

UPDATE
if fail INSERT

This way it's atomic aswell.