Resizing an instance with a volume attached fails to reattach volume to instance

Bug #1051600 reported by Kiall Mac Innes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Rafi Khardalian

Bug Description

Resizing an instance with an attached volume appears to succeed, but it does not re-attach the volume to the instance - nor does it mark the volume as detached in the nova/cinder databases.

This results in being unable to detach the volume, and forces an administrator to manually edit the nova+cinder databases to allow the volume to be reattached.

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

Changed in nova:
assignee: nobody → Rafi Khardalian (rkhardalian)
status: New → In Progress
Dan Prince (dan-prince)
Changed in nova:
importance: Undecided → High
milestone: none → folsom-rc1
Revision history for this message
Mark McLoughlin (markmc) wrote :

This is a pretty serious bug, but the fix is fairly scary - e.g. starting the VM as paused and then resuming it is the kind of thing that is likely to break in some weird way in some obscure situations

This looks like it was always issue and isn't a regression since Essex. Since rc1 is about to be cut within hours, it makes sense to defer this fix until Grizzly. It can always be backported to stable/folsom later

Changed in nova:
milestone: folsom-rc1 → none
Revision history for this message
Rafi Khardalian (rkhardalian) wrote :

If I can eliminate the need to start the VM paused, would you reconsider merging this in for Folsom?

The idea would be to to look into how generate the volume references in the XML prior to starting the VM, rather than calling attach afterwards (not sure how to do this yet).

Revision history for this message
Rafi Khardalian (rkhardalian) wrote :

I've reworked the patch to eliminate pausing VMs paused. Hopefully this mitigates the concerns around potentially obscure situations.

More detail about how/what I changed is in the review comments.

Revision history for this message
Kiall Mac Innes (kiall) wrote :

Failing a proper fix in folsum, can we at least ensure that the resize command detects the volume's and refuses to start the resize?

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

Reviewed: https://review.openstack.org/13071
Committed: http://github.com/openstack/nova/commit/b01ec8012a2a2568feb5fa05a56909a6bdf14ef8
Submitter: Jenkins
Branch: master

commit b01ec8012a2a2568feb5fa05a56909a6bdf14ef8
Author: Rafi Khardalian <email address hidden>
Date: Sun Sep 16 16:28:58 2012 +0000

    Re-attach volumes after instance resize

    Fixes bug 1051600.

    Update the compute manager to pass block_device_info to three
    additional driver entry points and update all virtualization drivers
    to accept it as an optional argument.

    Within libvirt, migrate_disk_and_power_off() will now iterate and disconnect
    any existing connections. finish_migration() simply updates its use
    of to_xml(), passing block_device_info, which returns a libvirt XML
    fully populated with volumes. Finally, finish_revert_migration() no
    longer uses the on-disk XML file, instead generating it via to_xml; as
    the former lacks volume configuration.

    Change-Id: I7dccd03ef9cc7d2848f07764d4def3787e41e202

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