一: openstack 迁移报错,日志详情
Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher [req-fe373e8f-67f2-457c-aad4-f43b8a8c7bd0 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Exception during message handling: Unacceptable CPU info: CPU doesn't have compatibility. 0 Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last): 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 138, in _dispatch_and_reply 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher incoming.message)) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 185, in _dispatch 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 127, in _do_dispatch 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 110, in wrapped 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher payload) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher self.force_reraise() 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/exception.py", line 89, in wrapped 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher return f(self, context, *args, **kw) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 423, in decorated_function 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 388, in decorated_function 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher kwargs['instance'], e, sys.exc_info()) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__ 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher self.force_reraise() 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 376, in decorated_function 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 5150, in check_can_live_migrate_destination 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher disk_over_commit) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 5161, in _do_check_can_live_migrate_destination 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher block_migration, disk_over_commit) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5481, in check_can_live_migrate_destination 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher self._compare_cpu(None, source_cpu_info) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 5740, in _compare_cpu 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher raise exception.InvalidCPUInfo(reason=m % {'ret': ret, 'u': u}) 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher InvalidCPUInfo: Unacceptable CPU info: CPU doesn't have compatibility. 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher 0 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult 2017-10-09 15:23:58.969 45323 ERROR oslo_messaging.rpc.dispatcher 2017-10-09 15:23:58.972 45323 ERROR oslo_messaging._drivers.common [req-fe373e8f-67f2-457c-aad4-f43b8a8c7bd0 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Returning exception Unacceptable CPU info: CPU doesn't have compatibility.
二:解决办法
vim /usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py 5702 if guest_cpu is None: 5703 info = jsonutils.loads(host_cpu_str) 5704 LOG.info(_LI('Instance launched has CPU info: %s'), host_cpu_str) 5705 cpu = vconfig.LibvirtConfigCPU() 5706 cpu.arch = info['arch'] 5707 cpu.model = info['model'] 5708 cpu.vendor = info['vendor'] 5709 cpu.sockets = info['topology']['sockets'] 5710 cpu.cores = info['topology']['cores'] 5711 cpu.threads = info['topology']['threads'] 5712 #for f in info['features']: 5713 # cpu.add_feature(vconfig.LibvirtConfigCPUFeature(f)) 5714 # LOG.info("Add william info :%s CPU Feature" %f) 5715 else: 5716 cpu = self._vcpu_model_to_cpu_config(guest_cpu) 5717 5718 u = ("http://libvirt.org/html/libvirt-libvirt-host.html#" 5719 "virCPUCompareResult") 重启openstack-Nova-compute 服务 service openstack-nova-compute restart
三:验证问题
2017-10-09 16:40:05.731 113517 INFO nova.extend.network [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Add william check_result: True 2017-10-09 16:40:05.732 113517 INFO nova.extend.network [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Add william,vlan901 is exists,so is not create 2017-10-09 16:40:05.732 113517 INFO nova.compute.manager [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Add william, live migrate vm bridge_multiple_vlan True 2017-10-09 16:40:05.798 113517 INFO nova.virt.libvirt.driver [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Instance launched has CPU info: {"vendor": "Intel", "model": "Haswell-noTSX", "arch": "x86_64", "features": ["pge", "avx", "xsaveopt", "clflush", "sep", "syscall", "tsc_adjust", "vme", "dtes64", "invpcid", "msr", "sse", "xsave", "vmx", "erms", "xtpr", "cmov", "smep", "nx", "est", "pat", "monitor", "smx", "pbe", "lm", "tsc", "fpu", "fxsr", "tm", "sse4.1", "pae", "sse4.2", "pclmuldq", "pcid", "fma", "tsc-deadline", "mmx", "osxsave", "cx8", "mce", "de", "tm2", "ht", "dca", "pni", "abm", "popcnt", "mca", "pdpe1gb", "apic", "fsgsbase", "f16c", "pse", "ds", "invtsc", "lahf_lm", "aes", "avx2", "sse2", "ss", "ds_cpl", "arat", "bmi1", "bmi2", "acpi", "ssse3", "rdtscp", "cx16", "pse36", "mtrr", "movbe", "pdcm", "cmt", "rdrand", "x2apic"], "topology": {"cores": 10, "cells": 2, "threads": 2, "sockets": 1}} 2017-10-09 16:40:06.067 113517 INFO nova.extend.network [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Add william check_result: True 2017-10-09 16:40:06.069 113517 INFO nova.extend.network [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Add william,vlan901 is exists,so is not create 2017-10-09 16:40:06.070 113517 INFO nova.compute.manager [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] Add william, live migrate vm bridge_multiple_vlan True 2017-10-09 16:40:06.499 113517 INFO nova.virt.libvirt.firewall [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] [instance: 91619be9-3237-4831-aa41-fa4de9d338c3] Called setup_basic_filtering in nwfilter 2017-10-09 16:40:06.500 113517 INFO nova.virt.libvirt.firewall [req-4ea72563-ffd5-4fcf-b681-744c31810206 bc77306e71644a05b5ff27003e416aa5 9c40d724fb9e4281a03a4c8e19a8a85e - - -] [instance: 91619be9-3237-4831-aa41-fa4de9d338c3] Ensuring static filters 2017-10-09 16:40:06.863 113517 INFO nova.compute.manager [-] [instance: 91619be9-3237-4831-aa41-fa4de9d338c3] VM Started (Lifecycle Event) 2017-10-09 16:40:09.948 113517 INFO nova.compute.manager [req-6c39c35f-c5c4-4da7-b693-f4812e766f31 - - - - -] [instance: 91619be9-3237-4831-aa41-fa4de9d338c3] VM Resumed (Lifecycle Event)