2019独角兽企业重金招聘Python工程师标准>>>
感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正!
如有转载,请保留源作者博客信息。
如需交流,欢迎大家博客留言。
"/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 183, in doit
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher result = proxy_call(self._autowrap, f, *args, **kwargs)
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 141, in proxy_call
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher rv = execute(f, *args, **kwargs)
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 122, in execute
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher six.reraise(c, e, tb)
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 80, in tworker
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher rv = meth(*args, **kwargs)
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2878, in compareCPU
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher if ret == -1: raise libvirtError ('virConnectCompareCPU() failed', conn=self)
2014-11-12 18:14:33.353 31086 TRACE oslo.messaging.rpc.dispatcher libvirtError: XML error: CPU feature `pdpe1gb' specified more than once
|
2014-11-12 18:14:33.300 31086 ERROR nova.virt.libvirt.driver [req-e68bce7c-4d44-4a73-abc4-541b0914f772 973eab9670774f589c476b1c4164272b 5e4d0a6d39a44b9c906a3173b448aa4a] 176------------source_cpu_info == {"vendor": "Intel", "model": "SandyBridge", "arch": "x86_64", "features": ["pdpe1gb", "osxsave", "dca", "pcid", "pdcm", "xtpr", "tm2", "est", "smx", "vmx", "ds_cpl", "monitor", "dtes64", "pbe", "tm", "ht", "ss", "acpi", "ds", "vme", "pdpe1gb", "osxsave", "dca", "pcid", "pdcm", "xtpr", "tm2", "est", "smx", "vmx", "ds_cpl", "monitor", "dtes64", "pbe", "tm", "ht", "ss", "acpi", "ds", "vme", "lahf_lm", "lm", "rdtscp", "nx", "syscall", "avx", "xsave", "aes", "tsc-deadline", "popcnt", "x2apic", "sse4.2", "sse4.1", "cx16", "ssse3", "pclmuldq", "pni", "sse2", "sse", "fxsr", "mmx", "clflush", "pse36", "pat", "cmov", "mca", "pge", "mtrr", "sep", "apic", "cx8", "mce", "pae", "msr", "tsc", "pse", "de", "fpu"], "topology": {"cores": 2, "threads": 1, "sockets": 1}} ---------------------------------------------
2014-11-12 18:14:33.307 31086 ERROR nova.virt.libvirt.driver [req-e68bce7c-4d44-4a73-abc4-541b0914f772 973eab9670774f589c476b1c4164272b 5e4d0a6d39a44b9c906a3173b448aa4a] CPU doesn't have compatibility.
XML error: CPU feature `pdpe1gb' specified more than once
|
58fb4811] An error occurred while trying to launch a defined domain with xml:
2014-11-12 22:22:37.770 21166 ERROR nova.compute.manager [req-8c6906c1-9a58-4de7-a78b-1b1097fa551f 973eab9670774f589c476b1c4164272b 84e02e81eb934b7a957e63c058fb4811] [instance: e72e98dc-567d-4c5e-aefe-3d755ad7c40b] Failed to deallocate network for instance.
2014-11-12 22:22:37.925 21166 ERROR root [-] Original exception being dropped: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1390, in _reschedule_or_error\n bdms, requested_networks)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2116, in _shutdown_instance\n self._try_deallocate_network(context, instance, requested_networks)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2080, in _try_deallocate_network\n self._set_instance_error_state(context, instance[\'uuid\'])\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2075, in _try_deallocate_network\n self._deallocate_network(context, instance, requested_networks)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1769, in _deallocate_network\n context, instance, requested_networks=requested_networks)\n', ' File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 410, in deallocate_for_instance\n data = neutron.list_ports(**search_opts)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 111, in with_params\n ret = self.function(instance, *args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 306, in list_ports\n **_params)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1250, in list\n for r in self._pagination(collection, path, **params):\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1263, in _pagination\n res = self.get(path, params=params)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1236, in get\n headers=headers, params=params)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1221, in retry_request\n headers=headers, params=params)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/v2_0/client.py", line 1156, in do_request\n resp, replybody = self.httpclient.do_request(action, method, body=body)\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/client.py", line 195, in do_request\n self.authenticate()\n', ' File "/usr/lib/python2.6/site-packages/neutronclient/client.py", line 231, in authenticate\n token_url = self.auth_url + "/tokens"\n', "TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'\n"]
2014-11-12 22:22:38.429 21166 ERROR oslo.messaging.rpc.dispatcher [-] Exception during message handling: 'ascii' codec can't decode byte 0xe8 in position 49: ordinal not in range(128)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/server.py", line 139, in inner
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher return func(*args, **kwargs)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/exception.py", line 88, in wrapped
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher payload)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/exception.py", line 71, in wrapped
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher return f(self, context, *args, **kw)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 274, in decorated_function
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher pass
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 260, in decorated_function
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 327, in decorated_function
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher function(self, context, *args, **kwargs)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 303, in decorated_function
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher e, sys.exc_info())
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 290, in decorated_function
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher return function(self, context, *args, **kwargs)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2069, in run_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher do_run_instance()
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 249, in inner
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2068, in do_run_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher legacy_bdm_in_spec)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1201, in _run_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher notify("error", fault=e) # notify that build failed
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1185, in _run_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher instance, image_meta, legacy_bdm_in_spec)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1349, in _build_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher filter_properties, bdms, legacy_bdm_in_spec)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1395, in _reschedule_or_error
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher self._log_original_error(exc_info, instance_uuid)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1364, in _log_original_error
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher LOG.error(_('Error: %s') % exc_info[1], instance_uuid=instance_uuid,
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 49: ordinal not in range(128)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher
tils.py", line 68, in __exit__
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1185, in _run_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher instance, image_meta, legacy_bdm_in_spec)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1349, in _build_instance
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher filter_properties, bdms, legacy_bdm_in_spec)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1395, in _reschedule_or_error
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher self._log_original_error(exc_info, instance_uuid)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1364, in _log_original_error
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher LOG.error(_('Error: %s') % exc_info[1], instance_uuid=instance_uuid,
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 49: ordinal not in range(128)
2014-11-12 22:22:38.429 21166 TRACE oslo.messaging.rpc.dispatcher
2014-11-12 22:22:38.432 21166 ERROR oslo.messaging._drivers.common [-] Returning exception 'ascii' codec can't decode byte 0xe8 in position 49: ordinal not in range(128) to caller
2014-11-12 22:22:38.432 21166 ERROR oslo.messaging._drivers.common [-] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/server.py", line 139, in inner\n return func(*args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/nova/exception.py", line 88, in wrapped\n payload)\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.6/site-packages/nova/exception.py", line 71, in wrapped\n return f(self, context, *args, **kw)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 274, in decorated_function\n pass\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 260, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 327, in decorated_function\n function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 303, in decorated_function\n e, sys.exc_info())\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 290, in decorated_function\n return function(self, context, *args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2069, in run_instance\n do_run_instance()\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 249, in inner\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 2068, in do_run_instance\n legacy_bdm_in_spec)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1201, in _run_instance\n notify("error", fault=e) # notify that build failed\n', ' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1185, in _run_instance\n instance, image_meta, legacy_bdm_in_spec)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1349, in _build_instance\n filter_properties, bdms, legacy_bdm_in_spec)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1395, in _reschedule_or_error\n self._log_original_error(exc_info, instance_uuid)\n', ' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1364, in _log_original_error\n LOG.error(_(\'Error: %s\') % exc_info[1], instance_uuid=instance_uuid,\n', "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe8 in position 49: ordinal not in range(128)\n"]
|
Refer to http://libvirt.org/html/libvirt-libvirt.html#virCPUCompareResult 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last): 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher incoming.message)) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/exception.py", line 88, in wrapped 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher payload) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__ 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/exception.py", line 71, in wrapped 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher return f(self, context, *args, **kw) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 303, in decorated_function 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher e, sys.exc_info()) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__ 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 290, in decorated_function 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher return function(self, context, *args, **kwargs) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4406, in check_can_live_migrate_destination 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher block_migration, disk_over_commit) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 4201, in check_can_live_migrate_destination 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher self._compare_cpu(source_cpu_info) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.6/site-packages/nova/virt/libvirt/driver.py", line 4381, in _compare_cpu 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher raise exception.InvalidCPUInfo(reason=m % {'ret': ret, 'u': u}) 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher InvalidCPUInfo: Unacceptable CPU info: CPU doesn't have compatibility. 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher 0 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher Refer to http://libvirt.org/html/libvirt-libvirt.html#virCPUCompareResult 2014-11-25 13:06:00.744 12150 TRACE oslo.messaging.rpc.dispatcher 2014-11-25 13:06:00.746 12150 ERROR oslo.messaging._drivers.common [-] Returning exception Unacceptable CPU info: CPU doesn't have compatibility. |
2014-11-25 14:16:48.572 19451 ERROR nova.virt.libvirt.driver [req-4f072e10-a19a-4f39-ad37-275b81d13482 973eab9670774f589c476b1c4164272b 5e4d0a6d39a44b9c906a3173b448aa4a] 1--------------cpu==
|
2014-11-25 13:06:00.523 12150 ERROR nova.virt.libvirt.driver [req-b97847d1-22a0-4b77-8531-622a5b033818 973eab9670774f589c476b1c4164272b 5e4d0a6d39a44b9c906a3173b448aa4a] 1--------------cpu=={'ns_prefix': None, 'vendor': u'Intel', 'features': [
2014-11-25 13:06:00.527 12150 ERROR nova.virt.libvirt.driver [req-b97847d1-22a0-4b77-8531-622a5b033818 973eab9670774f589c476b1c4164272b 5e4d0a6d39a44b9c906a3173b448aa4a] ttx-----------------------------
2014-11-25 13:06:00.527 12150 ERROR nova.virt.libvirt.driver [req-b97847d1-22a0-4b77-8531-622a5b033818 973eab9670774f589c476b1c4164272b 5e4d0a6d39a44b9c906a3173b448aa4a] CPU doesn't have compatibility.
|
PowerKVM 上 libvirt API 的 CPU 选项如果 PowerKVM 访客的 CPU 功能与主机系统不同,那么您可以更改 libvirt API 的 CPU 设置。 在大多数情况下,不需要指定 CPU 方式。libvirt API 将自动选择相应的设置。例外的情况是,您要从 Power® 处理器的先前版本迁移至运行 PowerKVM 的 POWER8™ 系统。 libvirt API 上 CPU 方式设置的选项如下所示:
|
host-model 根据物理CPU的特性,选择一个最靠近的标准CPU型号,xml配置文件为:
host-passthrough 直接将物理CPU 暴露给虚拟机使用,在虚拟机上完全可以看到的就是物理CPU的型号;xml配置文件为:
hi Yaguang: in openstack, if you migrating vm from Haswell to SandyBridge, it is OK. but if you migrating vm from SandyBridge if we want to migrate between different cpu mode, we can use the same cpu mode. libvirt support the cpu model lable. if you want migrate from SandyBridge to Haswell, you can set the lable, model is SandyBridge. because Haswell is also compatible with SandyBridge. but openstack don't support set the mode cpu, so we can modify the code. if we disable the check, it will get some unknown error. because the vm run the different core cmd. thanks |
grep -rn "virConnectCompareCPU" ./src/
|
* @conn : virConnect connection
* @xmlDesc: XML describing the CPU to compare with host CPU
* @flags : extra flags; not used yet, so callers should always pass 0
* #将传入的cpu描述与本机host cpu参数比较
* Compares the given CPU description with the host CPU
*
* Returns comparison result according to enum virCPUCompareResult
*/
int
virConnectCompareCPU(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags)
{
VIR_DEBUG("conn=%p, xmlDesc=%s, flags=%x", conn, xmlDesc, flags);
virResetLastError();
if (!VIR_IS_CONNECT(conn)) {
virLibConnError(VIR_ERR_INVALID_CONN, __FUNCTION__);
virDispatchError(NULL);
return VIR_CPU_COMPARE_ERROR;
}
virCheckNonNullArgGoto(xmlDesc, error);
if (conn->driver->connectCompareCPU) {
int ret;
#跟进到步骤7
ret = conn->driver->connectCompareCPU(conn, xmlDesc, flags);
if (ret == VIR_CPU_COMPARE_ERROR)
goto error;
return ret;
}
virLibConnError(VIR_ERR_NO_SUPPORT, __FUNCTION__);
error:
virDispatchError(conn);
return VIR_CPU_COMPARE_ERROR;
}
|
grep -rn "connectCompareCPU" ./src/
|
static int
qemuConnectCompareCPU(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags)
{
virQEMUDriverPtr driver = conn->privateData;
int ret = VIR_CPU_COMPARE_ERROR;
virCapsPtr caps = NULL;
virCheckFlags(0, VIR_CPU_COMPARE_ERROR);
if (virConnectCompareCPUEnsureACL(conn) < 0)
goto cleanup;
#获取caps
if (!(caps = virQEMUDriverGetCapabilities (driver, false))) #跟进到9-1
goto cleanup;
if (!caps->host.cpu || #判断host.cpu、model为空则警告,返回不兼容
!caps->host.cpu->model) {
VIR_WARN("cannot get host CPU capabilities");
ret = VIR_CPU_COMPARE_INCOMPATIBLE;
} else {
ret = cpuCompareXML(caps->host.cpu, xmlDesc); #跟进到10
}
cleanup:
virObjectUnref(caps);
return ret;
}
|
yum install vim ctags
安装完毕,执行命令生成ctags索引:
vim ./src/qemu/qemu_driver.c
光标在virQEMUDriverGetCapabilities函数上,快捷键“ctrl+]”跳转到函数定义:
再次"ctrl+o“跳转回来。
更多ctags使用,请网上自行查找。
|
/**
* virQEMUDriverGetCapabilities:
*
* Get a reference to the virCapsPtr instance for the
* driver. If @refresh is true, the capabilities will be
* rebuilt first
*
* The caller must release the reference with virObjetUnref
*
* Returns: a reference to a virCapsPtr instance or NULL
*/
virCapsPtr virQEMUDriverGetCapabilities(virQEMUDriverPtr driver,
bool refresh)
{
virCapsPtr ret = NULL;
if (refresh) {
virCapsPtr caps = NULL;
if ((caps = virQEMUDriverCreateCapabilities(driver)) == NULL)
return NULL;
qemuDriverLock(driver);
virObjectUnref(driver->caps);
driver->caps = caps;
} else {
qemuDriverLock(driver);
}
ret = virObjectRef(driver->caps);
qemuDriverUnlock(driver);
return ret;
}
|
virCPUCompareResult
cpuCompareXML(virCPUDefPtr host,
const char *xml)
{
xmlDocPtr doc = NULL;
xmlXPathContextPtr ctxt = NULL;
virCPUDefPtr cpu = NULL;
virCPUCompareResult ret = VIR_CPU_COMPARE_ERROR;
VIR_DEBUG("host=%p, xml=%s", host, NULLSTR(xml));
if (!(doc = virXMLParseStringCtxt(xml, _("(CPU_definition)"), &ctxt)))
goto cleanup;
cpu = virCPUDefParseXML(ctxt->node, ctxt, VIR_CPU_TYPE_AUTO);
if (cpu == NULL)
goto cleanup;
if (!cpu->model) {
virReportError(VIR_ERR_OPERATION_INVALID,
"%s", _("no CPU model specified"));
goto cleanup;
}
ret = cpuCompare(host, cpu); #跟进到11
cleanup:
virCPUDefFree(cpu);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(doc);
return ret;
}
|
virCPUCompareResult
cpuCompare(virCPUDefPtr host,
virCPUDefPtr cpu)
{
struct cpuArchDriver *driver;
VIR_DEBUG("host=%p, cpu=%p", host, cpu);
if ((driver = cpuGetSubDriver(host->arch)) == NULL) #如果host arch为空报错
return VIR_CPU_COMPARE_ERROR;
if (driver->compare == NULL) {
virReportError(VIR_ERR_NO_SUPPORT,
_("cannot compare CPUs of %s architecture"),
virArchToString(host->arch));
return VIR_CPU_COMPARE_ERROR;
}
return driver->compare(host, cpu); #跟进到12???:
}
|
12:
grep -rn "cpuArchDriver" ./src/
|
#define NR_DRIVERS ARRAY_CARDINALITY(drivers)
#define VIR_FROM_THIS VIR_FROM_CPU
static struct cpuArchDriver *drivers[] = {
&cpuDriverX86, //跟进到14
&cpuDriverPowerPC,
&cpuDriverS390,
&cpuDriverArm,
/* generic driver must always be the last one */
&cpuDriverGeneric
};
|
|
static virCPUCompareResult
x86Compute(virCPUDefPtr host,
virCPUDefPtr cpu,
virCPUDataPtr *guest,
char **message)
{
struct x86_map *map = NULL;
struct x86_model *host_model = NULL;
struct x86_model *cpu_force = NULL;
struct x86_model *cpu_require = NULL;
struct x86_model *cpu_optional = NULL;
struct x86_model *cpu_disable = NULL;
struct x86_model *cpu_forbid = NULL;
struct x86_model *diff = NULL;
struct x86_model *guest_model = NULL;
virCPUCompareResult ret;
enum compare_result result;
virArch arch;
size_t i;
if (cpu->arch != VIR_ARCH_NONE) {
bool found = false;
for (i = 0; i < ARRAY_CARDINALITY(archs); i++) {
if (archs[i] == cpu->arch) { #此处判断如果arch相同则found 设置为true
found = true;
break;
}
}
if (!found) { #如果arch不匹配,返回不兼容
VIR_DEBUG("CPU arch %s does not match host arch",
virArchToString(cpu->arch));
if (message &&
virAsprintf(message,
_("CPU arch %s does not match host arch"),
virArchToString(cpu->arch)) < 0)
goto error;
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
arch = cpu->arch;
} else {
arch = host->arch;
}
#如果本机host vendor 为空,或者传入vendor 与本机vendor 不等,返回不兼容
if (cpu->vendor &&
(!host->vendor || STRNEQ(cpu->vendor, host->vendor))) {
VIR_DEBUG("host CPU vendor does not match required CPU vendor %s",
cpu->vendor);
if (message &&
virAsprintf(message,
_("host CPU vendor does not match required "
"CPU vendor %s"),
cpu->vendor) < 0)
goto error;
return VIR_CPU_COMPARE_INCOMPATIBLE;
}
//后续流程比较繁杂,则不一一分析,有兴趣者,请自行分析
if (!(map = x86LoadMap()) ||
!(host_model = x86ModelFromCPU(host, map, VIR_CPU_FEATURE_REQUIRE)) ||
!(cpu_force = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_FORCE)) ||
!(cpu_require = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_REQUIRE)) ||
!(cpu_optional = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_OPTIONAL)) ||
!(cpu_disable = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_DISABLE)) ||
!(cpu_forbid = x86ModelFromCPU(cpu, map, VIR_CPU_FEATURE_FORBID)))
goto error;
x86DataIntersect(cpu_forbid->data, host_model->data);
if (!x86DataIsEmpty(cpu_forbid->data)) {
virX86CpuIncompatible(N_("Host CPU provides forbidden features"),
cpu_forbid->data);
goto out;
}
/* first remove features that were inherited from the CPU model and were
* explicitly forced, disabled, or made optional
*/
x86DataSubtract(cpu_require->data, cpu_force->data);
x86DataSubtract(cpu_require->data, cpu_optional->data);
x86DataSubtract(cpu_require->data, cpu_disable->data);
result = x86ModelCompare(host_model, cpu_require);
if (result == SUBSET || result == UNRELATED) {
x86DataSubtract(cpu_require->data, host_model->data);
virX86CpuIncompatible(N_("Host CPU does not provide required "
"features"),
cpu_require->data);
goto out;
}
ret = VIR_CPU_COMPARE_IDENTICAL;
if ((diff = x86ModelCopy(host_model)) == NULL)
goto error;
x86DataSubtract(diff->data, cpu_optional->data);
x86DataSubtract(diff->data, cpu_require->data);
x86DataSubtract(diff->data, cpu_disable->data);
x86DataSubtract(diff->data, cpu_force->data);
if (!x86DataIsEmpty(diff->data))
ret = VIR_CPU_COMPARE_SUPERSET;
if (ret == VIR_CPU_COMPARE_SUPERSET
&& cpu->type == VIR_CPU_TYPE_GUEST
&& cpu->match == VIR_CPU_MATCH_STRICT) {
virX86CpuIncompatible(N_("Host CPU does not strictly match guest CPU: "
"Extra features"),
diff->data);
goto out;
}
if (guest != NULL) {
struct cpuX86Data *guestData;
if ((guest_model = x86ModelCopy(host_model)) == NULL)
goto error;
if (cpu->type == VIR_CPU_TYPE_GUEST
&& cpu->match == VIR_CPU_MATCH_EXACT)
x86DataSubtract(guest_model->data, diff->data);
if (x86DataAdd(guest_model->data, cpu_force->data))
goto error;
x86DataSubtract(guest_model->data, cpu_disable->data);
if (!(guestData = x86DataCopy(guest_model->data)) ||
!(*guest = x86MakeCPUData(arch, &guestData))) {
x86DataFree(guestData);
goto error;
}
}
out:
x86MapFree(map);
x86ModelFree(host_model);
x86ModelFree(diff);
x86ModelFree(cpu_force);
x86ModelFree(cpu_require);
x86ModelFree(cpu_optional);
x86ModelFree(cpu_disable);
x86ModelFree(cpu_forbid);
x86ModelFree(guest_model);
return ret;
error:
ret = VIR_CPU_COMPARE_ERROR;
goto out;
}
|