live migration: cpu doesn't have compatibility

Asked by Zhiyuan Zhou

I deployed ESSEX with two nodes, when I use live migration (nova live-migration instance_uuid targetHost ) , there will be error reported "cpu doesn't have compatibility".
I checked the target machine CPU do have less features (just two flags less) than source machine ; but both the two CPU is VT enabled, they just have 2 features differ.
If I migrate a instance from the feature-richer node to the other node, it works well.
This could be a possible problem of migration feature? the differences between these CPUs are actually not important for virtual machine running, nova should just check the required features but not CPU features exactly greater or equal ?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Zhiyuan Zhou
Solved:
Last query:
Last reply:
Revision history for this message
Zhiyuan Zhou (zhyuan-zhou) said :
#1

Looks libvirt can help caculate common set of CPU capabilities for a pool of host machines. But can anyone explain how to configure it (whether on libvirt on nova)?

Revision history for this message
Juan Caceres (juan-caceres) said :
#2

Have you a solution for this problem Zhou i'm facing that problem too.

Revision history for this message
Juan Caceres (juan-caceres) said :
#3

If you check the scheduler log its a Libvirt thing:

2012-09-18 09:48:26 TRACE nova.scheduler.driver raise result
2012-09-18 09:48:26 TRACE nova.scheduler.driver RemoteError: Remote error: InvalidCPUInfo Unacceptable CPU info: CPU doesn't have compatibility.
2012-09-18 09:48:26 TRACE nova.scheduler.driver
2012-09-18 09:48:26 TRACE nova.scheduler.driver 0
2012-09-18 09:48:26 TRACE nova.scheduler.driver
2012-09-18 09:48:26 TRACE nova.scheduler.driver Refer to http://libvirt.org/html/libvirt-libvirt.html#virCPUCompareResult

Some clue?

Revision history for this message
Zhiyuan Zhou (zhyuan-zhou) said :
#4

Sorry for reply late. We end up modify the migration code , relax the CPU check logic.

You can find the code at nova/virt/libvirt/driver.py #check_can_live_migrate_destination

def check_can_live_migrate_destination(self, ctxt, instance_ref,
                                           block_migration=False,
       ....
        # Compare CPU
        src = instance_ref['host']
        source_cpu_info = self._get_compute_info(ctxt, src)['cpu_info']
        self._compare_cpu(source_cpu_info)

        # Create file on storage, to be checked on source host
        filename = self._create_shared_storage_test_file()

        return {"filename": filename, "block_migration": block_migration}

Revision history for this message
maying (breeze7086) said :
#5

hello Zhiyuan Zhou
I'm facing the same problem with you , how did you fix it ?

Revision history for this message
welmessor (wei-m-gao) said :
#6

Hi Zhou, according to what you replied on 9/24, i assumed that you referred to the Folsom version. I want to check with you that except the solution you took (modify the code), is there any other options avaliable ? thanks in advance!