Openstack creates a new instance and solves various error reports

Recently, I installed openstack, zero basic installation, and referred to many online tutorials

The consequence of eating a hundred meals is that there are a lot of unknown problems… Openstack installation is complex. Many configuration files are incorrectly configured in one place, which may lead to the unavailability of later functions

This document only records a series of errors and troubleshooting process encountered when starting the instance after installation

BUG 1: No valid host

Error reporting

No valid host was found. There are not enough hosts available.

Solution

Network node execution

[[email protected] ~]# vim /etc/sysctl.conf 

Add the following:

net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0

Verify whether it is effective

[[email protected] ~]# sysctl -p
net.ipv4.ip_forward = 1
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0

 

BUG 2: Unable to convert image to raw

error

69ad3af8-3253-4a35-a6f1-ee5bcd1e37f2 aborted: Image 8f9cf451-764e-4219-ba0b-2edb93a9e63e is unacceptable: Unable to convert image to raw: Image /var/lib/nova/instances/_base/9b2bd71aef84e92d7147d0eb3697710afd403a4a.part is unacceptable: Unable to convert image to raw: Unexpected error while running command.
2019-11-15 01:12:18.776 162849 ERROR nova.compute.manager [instance: 69ad3af8-3253-4a35-a6f1-ee5bcd1e37f2] Command: qemu-img convert -O raw -f qcow2 /var/lib/nova/instances/_base/9b2bd71aef84e92d7147d0eb3697710afd403a4a.part /var/lib/nova/instances/_base/9b2bd71aef84e92d7147d0eb3697710afd403a4a.converted
2019-11-15 01:12:18.776 162849 ERROR nova.compute.manager [instance: 69ad3af8-3253-4a35-a6f1-ee5bcd1e37f2] Exit code: 1
2019-11-15 01:12:18.776 162849 ERROR nova.compute.manager [instance: 69ad3af8-3253-4a35-a6f1-ee5bcd1e37f2] Stdout: u''
2019-11-15 01:12:18.776 162849 ERROR nova.compute.manager [instance: 69ad3af8-3253-4a35-a6f1-ee5bcd1e37f2] Stderr: u'qemu-img: error while reading sector 17280: Input/output error\n'

Troubleshooting process

After developing for Baidu, I found the answer on openstack’s official website QA: the image upload is incomplete

 

Reference link: image is unacceptable: unable to convert image to raw

So upload again, and find new problems after uploading

BUG 3: CPU feature spec-ctrl not found

Error reporting

internal error: process exited while connecting to monitor: 2019-11-15T09:42:49.789389Z qemu-kvm: CPU feature spec-ctrl not found

Analysis and troubleshooting

After Baidu checked many articles, I found that the following one is very reasonable

Reference link: can openstack swallow the skylake hot dog

When checking the Nova compute log of the corresponding computing node, it is found that there is an error message in the log

qemu-kvm: CPU feature spec-ctrl not found

The log conveys several messages:

Libvirt’s get host CPU instruction set list contains this feature

QEMU KVM does not support the CPU feature spec Ctrl

Solution

Upgrade libvirt and QEMU to fit the new CPU

Modify the instruction set list obtained by the compute node libvirt_Map.xml to mask CPU features that are not supported by virtualization components. Backup CPU_Map. XML file, and then modify/usr/share/libvirt/CPU_Map.xml, and delete the spec Ctrl related features

 

Finally, restart the libvirt service to take effect

Considering that the upgrade of libvirt and QEMU has a great impact and may affect some logic and functions after the upgrade, the second solution is recommended

Configuration like this

<model name='Haswell-noTSX-IBRS'>
  <model name='Haswell-noTSX'/>
  <feature name='spec-ctrl'/>
</model>

Change to

<model name='Haswell-noTSX-IBRS'>
  <model name='Haswell-noTSX'/>
</model>

Delete such directly

<feature name='spec-ctrl'>
  <cpuid eax_in='0x07' ecx_in='0x00' edx='0x04000000'/>
</feature>

Restart libvirt

[[email protected] ~]# systemctl restart libvirtd.service

After the above operations are completed, create a new instance again, and the following errors may be reported:

internal error: process exited while connecting to monitor: 2019-11-15T11:02:14.259953Z qemu-kvm: CPU feature stibp not found

Just perform the same operation as above for spec Ctrl

 

Similar Posts: