xen: resize assumes an ephemeral was migrated if the new flavor has one

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

Bug Description

When resizing from a flavor with no ephemeral disk to a flavor which includes one an error is raise due to a migrated ephemeral disk not being found. The migration code needs to consider the original flavor when looking for migrated ephemeral disks.

2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] import_root=import_root)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/nova/virt/xenapi/vm_utils.py", line 2532, in import_all_migrated_disks
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] eph_vdis = _import_migrate_ephemeral_disks(session, instance)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/nova/virt/xenapi/vm_utils.py", line 2554, in _import_migrate_ephemeral_disks
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] vdi_label)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/nova/virt/xenapi/vm_utils.py", line 2566, in _import_migrated_vhds
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] sr_path=get_sr_path(session), uuid_stack=_make_uuid_stack())
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/nova/virt/xenapi/client/session.py", line 227, in call_plugin_serialized
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] rv = self.call_plugin(plugin, fn, params)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/nova/virt/xenapi/client/session.py", line 223, in call_plugin
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] self.host_ref, plugin, fn, args)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/nova/virt/xenapi/client/session.py", line 297, in _unwrap_plugin_exceptions
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] return func(*args, **kwargs)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/XenAPI.py", line 229, in __call__
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] return self.__send(self.__name, args)
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/XenAPI.py", line 133, in xenapi_request
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] result = _parse_result(getattr(self, methodname)(*full_params))
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] File "/opt/rackstack/rackstack.348.13/nova/lib/python2.7/site-packages/XenAPI.py", line 203, in _parse_result
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] raise Failure(result['ErrorDescription'])
2015-08-20 14:38:07.744 23025 ERROR nova.utils [instance: 38a0406d-1ba0f514764d] Failure: ['XENAPI_PLUGIN_FAILURE', 'move_vhds_into_sr', 'OSError', "[Errno 2] No such file or directory: '/images/instance38a0406d-1ba0f514764d_ephemeral_1'"]

Tags: resize xen
tags: added: xen
tags: added: resize
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/217176

Changed in nova:
assignee: nobody → Andrew Laski (alaski)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 773408408cbace35957390811df33462cdc73e7d
Author: Andrew Laski <email address hidden>
Date: Wed Aug 26 10:00:27 2015 -0400

    Xen: import migrated ephemeral disk based on previous size

    When migrating an instance with the xenapi driver it copies the VHDs
    over to the destination host and then imports them into the SR on that
    host. It was attempting to import ephemeral disks based on the size of
    the ephemeral disk for the new flavor, not the old flavor being
    migrated. This caused a failure when the old flavor did not have an
    ephemeral and the new flavor did so Nova was attempting to import an
    ephemeral disk that didn't exist.

    Now ephemeral disks will be imported based on what the old flavor would
    have migrated.

    Change-Id: I80485fd473e8b580cc4b0a537c716bf6202a5eb2
    Closes-Bug: 1488635

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