The vm system disk data was overided by glance image data when evacuating a vm on shared storage

Bug #1372472 reported by H3C iMC
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Critical
H3C iMC

Bug Description

The vm system disk data was overided by glance image data when evacuating a vm on shared storage.

I use the function of evacuating vm to another host on a shared storage(nova evacuate instance-uuid host --on-shared-storage command), and expect the data remains after evacuate, but when I do it, the data lost acually, I see the code in the master branch, the _rebuild_default_impl function's recreate parameter is not set when called by rebuild_instance function, thus when evacuate a vm, the recreate parameter is false and vm will be always destroyed by _rebuild_default_impl .

The nova/compute/manager.py file in icehouse version:

    @object_compat
    @messaging.expected_exceptions(exception.PreserveEphemeralNotSupported)
    @wrap_exception()
    @reverts_task_state
    @wrap_instance_event
    @wrap_instance_fault
    def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
                         injected_files, new_pass, orig_sys_metadata,
                         bdms, recreate, on_shared_storage,
                         preserve_ephemeral=False):
     **********
            kwargs = dict(
                context=context,
                instance=instance,
                image_meta=image_meta,
                injected_files=files,
                admin_password=new_pass,
                bdms=bdms,
                detach_block_devices=detach_block_devices,
                attach_block_devices=self._prep_block_device,
                block_device_info=block_device_info,
                network_info=network_info,
                preserve_ephemeral=preserve_ephemeral)

the kwargs lost parameter recreate=recreate, and it result in the data always destroyed when a vm evacuated.

Revision history for this message
Sean Dague (sdague) wrote :

Can you provide a reproduce scenario? What's the overall configuration and version of components? What series of operations did you do (preferably a set of nova command line commands)? What did you expect to happen and what actually happened?

Changed in nova:
status: New → Incomplete
H3C iMC (tianshuli614)
description: updated
Changed in nova:
status: Incomplete → New
assignee: nobody → H3C iMC (tianshuli614)
status: New → In Progress
H3C iMC (tianshuli614)
Changed in nova:
importance: Undecided → Critical
Revision history for this message
7.NoJ (hejiantao5-f) wrote :

Here --on-shared-storage means source and target hosts share the same libvirt.xml file, which is stored in another place and mount to same path to them.
And libvirt.xml file describes where the disk is, So the disk data is not related to it I think

Revision history for this message
Nobuyoshi NIHONGI (nihongi) wrote :
Revision history for this message
Matt Riedemann (mriedem) wrote :
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.