admin 发表于 2021-9-4 18:43:35

Failed to build and run instance: TypeError: Argument must be bytes or unicode,

2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager [req-32f11d3c-7437-47c8-a3b0-c739c561ebbe fadb888e3a2944749bec573661254f02 51c784a90f3c4b16baf606b5bc6ac917
- default default] Failed to build and run instance: TypeError: Argument must be bytes or unicode, got 'NoneType'
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager Traceback (most recent call last):
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/compute/mana
ger.py", line 2385, in _build_and_run_instance
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    accel_info=accel_info)
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/virt/libvirt
/driver.py", line 3683, in spawn
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    mdevs=mdevs, accel_info=accel_info)
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/virt/libvirt
/driver.py", line 6412, in _get_guest_xml
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    xml = conf.to_xml()
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/virt/libvirt
/config.py", line 79, in to_xml
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    root = self.format_dom()
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/virt/libvirt
/config.py", line 2813, in format_dom
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    self._format_devices(root)
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/virt/libvirt
/config.py", line 2767, in _format_devices
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    devices.append(dev.format_dom())
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "/usr/lib/python3.6/site-packages/nova/virt/libvirt
/config.py", line 1121, in format_dom
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    uuid=self.auth_secret_uuid))
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "src/lxml/etree.pyx", line 2998, in lxml.etree.Elem
ent
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "src/lxml/apihelpers.pxi", line 131, in lxml.etree.
_makeElement
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "src/lxml/apihelpers.pxi", line 119, in lxml.etree.
_makeElement
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "src/lxml/apihelpers.pxi", line 297, in lxml.etree.
_initNodeAttributes
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "src/lxml/apihelpers.pxi", line 311, in lxml.etree.
_addAttributeToNode
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager    File "src/lxml/apihelpers.pxi", line 1437, in lxml.etree
._utf8
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager TypeError: Argument must be bytes or unicode, got 'NoneTyp
e'
2021-09-04 17:34:50.311 2909 ERROR nova.compute.manager


这个是因为缺少配置参数,nova.conf在libvirt选项中需要指定rbd_secret_uuid,如下

......
rbd_secret_uuid = xxxxxxxxxxxxxxxx
配置完成后重启nova-compute服务即可



admin 发表于 2021-9-5 20:31:52

如果cinder,volume节点也存在这样的问题,可以在cinder的配置文件中加入,重启cinder-volume和cinder-api服务。
同理glance
页: [1]
查看完整版本: Failed to build and run instance: TypeError: Argument must be bytes or unicode,