Cells: compute.instance.exists notification prior to rebuild has incorrect OS information

Bug #1292181 reported by Andrew Laski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Andrew Laski

Bug Description

Prior to a rebuild, nova issues a compute.instance.exists notification to capture usage for the period between the beginning of the day and the rebuild.

It should have the info for the instance prior to the rebuild, so if you are rebuilding from Centos 6.0 to Ubuntu 10.04, it should list a os_distribution of centos and an os_version of 6.0 Instead it's listing a distribution of Ubuntu and an os_version of 10.04 (i.e. the info for after the rebuild).

Tags: cells
Revision history for this message
Andrew Laski (alaski) wrote :

Before objects the rebuild method would put the new image into system_metadata and save it at the global level. When rebuild got to the cell the original system_metadata would be pulled from the db and held for notification purposes before the local system_metadata was updated. Now with instance objects when the system_metadata is saved at the global level that gets pushed down to the cell as well, so when it's pulled in rebuild at the cell level it has already been updated with the new image.

Changed in nova:
assignee: nobody → Andrew Laski (alaski)
status: New → In Progress
Matt Riedemann (mriedem)
tags: added: cells
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/80384

Andrew Laski (alaski)
Changed in nova:
importance: Undecided → Medium
Andrew Laski (alaski)
tags: added: icehouse-rc-potential
Matt Riedemann (mriedem)
Changed in nova:
milestone: none → icehouse-rc1
importance: Medium → High
tags: removed: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/80384
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c5e17f4dc2277ed422b060f860443d71a47fc440
Submitter: Jenkins
Branch: master

commit c5e17f4dc2277ed422b060f860443d71a47fc440
Author: Andrew Laski <email address hidden>
Date: Thu Mar 13 16:02:52 2014 -0400

    Don't sync [system_]metadata down to cells on instance.save()

    A cell should be authoritative for its metadata and system_metadata.
    rebuild relis on system_metadata not being updated until the cell
    updates it itself. update_instance_metadata relies on metadata not
    being updated so that it can calculate the diff properly.

    And before the objects conversion took place the compute.api.update()
    method that instance.save() replaced was not used for syncing metadata
    or system_metadata. So this change goes back to previous behaviour for
    cells.

    Change-Id: I339da9d1ff6d0e59f6a4ab68fd396bdfca7a224b
    Closes-bug: #1292181
    Closes-bug: #1292185

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

Reviewed: https://review.openstack.org/80374
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5df5c6c586f7cefa4e36a3c9938b16acbd0208bc
Submitter: Jenkins
Branch: master

commit 5df5c6c586f7cefa4e36a3c9938b16acbd0208bc
Author: Andrew Laski <email address hidden>
Date: Thu Mar 13 15:18:23 2014 -0400

    Adds test for rebuild in compute api

    While trying to verify a reported bug I wrote a test for the compute api
    rebuild method. The test verified that the bug was not here.

    Related-bug: #1292181

    Change-Id: I443f4d0927e7756a99b14b0491bb7f133ece5d86

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
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.