Migration 147 does not downgrade on MySQL

Bug #1207309 reported by Joshua Hesketh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Joshua Hesketh

Bug Description

OperationalError: (OperationalError) (1242, 'Subquery returns more than 1 row') 'UPDATE services SET availability_zone=(SELECT aggregate_metadata.value \nFROM aggregate_metadata, aggregate_hosts \nWHERE aggregate_hosts.aggregate_id = aggregate_metadata.aggregate_id AND aggregate_metadata.`key` = %s AND aggregate_hosts.host = services.host AND services.`binary` = %s)' ('availability_zone', 'nova-compute')

We should probably re-write this to select all of the services and insert them rather than as a sub-query.

Tags: db
Changed in nova:
assignee: nobody → Joshua Hesketh (joshua.hesketh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/39707

Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem)
tags: added: db
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/39707
Committed: http://github.com/openstack/nova/commit/3d36bf77c31f113a04a14bd94fe8c69c075408e1
Submitter: Jenkins
Branch: master

commit 3d36bf77c31f113a04a14bd94fe8c69c075408e1
Author: Joshua Hesketh <email address hidden>
Date: Thu Aug 1 23:42:05 2013 +1000

    Fix migration downgrade 147 with mysql

    Determine each service's availability zone and re-insert it back into the
    database to undo migration 147 with mysql.

    Fixes bug 1207309

    Change-Id: I6a96215f9e97874a64f9bcef56c3d32747fb754c

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.