instance path not be deleted after evacuate

Bug #1681687 reported by Xiao Gong
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Undecided
Unassigned

Bug Description

Description
===========
After evacuate an instance to a new host, then live-migration it to the old host, nova-compute report "DestinationDiskExists" error.

When nova-compute on old host restarts, it only deletes the evacuated instance path that needs destroying disks. If the instance is on shared block storage such as ceph, nova-compute will not delete instance path.

Steps to reproduce
===========
* create an instance on a compute node using ceph backend
* crash the compute node
* evacuate the instance
* reboot the crashed node

Expected result
===============
The evacuated instance path should be deleted.

Actual result
=============
After crashed nova-compute restarts, the instance path still exists.

Environment
===========
I used stable Newton. But I think it's still valid on the master.

Tags: evacuate
Xiao Gong (gongxiao)
Changed in nova:
assignee: nobody → Xiao Gong (gongxiao)
Xiao Gong (gongxiao)
tags: added: evacuate
Revision history for this message
Sean Dague (sdague) wrote :

Can we get a formal verification on master. So much of the ceph code has changed since then.

Changed in nova:
status: New → Incomplete
Revision history for this message
Xiao Gong (gongxiao) wrote :

I only have an Openstack in Newton, and I verified this bug on it.
I compare the code between Newton and master, there is no decisive difference.

relative code about cleanup method in master:

        is_shared_block_storage = False
        if migrate_data and 'is_shared_block_storage' in migrate_data:
            is_shared_block_storage = migrate_data.is_shared_block_storage
        if destroy_disks or is_shared_block_storage:
            attempts = int(instance.system_metadata.get('clean_attempts',
                                                        '0'))
            success = self.delete_instance_files(instance)
            # NOTE(mriedem): This is used in the _run_pending_deletes periodic
            # task in the compute manager. The tight coupling is not great...
            instance.system_metadata['clean_attempts'] = str(attempts + 1)
            if success:
                instance.cleaned = True
            instance.save()

the destroy_disks is false in ceph because ceph is shared block storage, and migrate_date is none in destroy_evacuated_instances scene. So the delete_instance_files method will not be executed.

Xiao Gong (gongxiao)
description: updated
Changed in nova:
status: Incomplete → Opinion
status: Opinion → Incomplete
Xiao Gong (gongxiao)
Changed in nova:
status: Incomplete → Confirmed
Sean Dague (sdague)
Changed in nova:
assignee: Xiao Gong (gongxiao) → nobody
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.