Instance.refresh() sends new info_cache objects

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

Bug Description

If an older node does an Instance.refresh() it will fail because conductor will overwrite the info_cache field with a new InstanceInfoCache object. This happens during the LifecycleEvent handler in nova-compute.

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Dan Smith (danms) wrote :

Here is the error that shows up in the log:

2014-01-07 06:43:52.519 ERROR nova.virt.driver [-] Exception dispatching event <nova.virt.event.LifecycleEvent object at 0x35e9d50>: Version 1.5 of InstanceInfoCache is not supported

It's pretty muted because it's just a lifecycle event, but it means that the refresh() action prevents those from going out. While it's buried pretty deep, the call to _sync_instance_power_state() from handle_lifecycle_event() is where this gets triggered:

https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4811

The refresh ends up with a new InstanceInfoCache attached to the Instance, which fails to deserialize on the older client.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit e73072e76c2aedfc52cd2de480b2f41b60769acc
Author: Dan Smith <email address hidden>
Date: Thu Jan 2 10:18:03 2014 -0800

    Prevent Instance.refresh() from returning a new info cache

    If an older node does a refresh() on an instance, conductor will
    return a new copy of the InstanceInfoCache, which the client
    will balk at. Instead, add a refresh() method to info_cache and
    call it from Instance.refresh().

    Closes-bug: #1265607
    Change-Id: I6a4787a23cd851cf56958c61f8b0559a79847ca0

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