We can reproduce this bug by deploying ironic with DevStack[1].
It happens with Nova API microversion 2.28 or later as follows.
~$ nova --os-compute-api-version 2.28 hypervisor-show 1
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<type 'exceptions.ValueError'> (HTTP 500) (Request-ID: req-06578b31-e22d-450f-855c-567ac0c3a804)
We can reproduce this bug by deploying ironic with DevStack[1].
It happens with Nova API microversion 2.28 or later as follows.
~$ nova --os-compute- api-version 2.28 hypervisor-show 1 bugs.launchpad. net/nova/ and attach the Nova API log if possible. ValueError' > (HTTP 500) (Request-ID: req-06578b31- e22d-450f- 855c-567ac0c3a8 04)
ERROR (ClientException): Unexpected API Error. Please report this at http://
<type 'exceptions.
~$ nova --os-compute- api-version 2.27 hypervisor-show 1 ------- ------- -----+- ------- ------- ------- ------- ------- --+ ------- ------- -----+- ------- ------- ------- ------- ------- --+ least | -10 | 97ec-4e8d- 84f5-cb6f99afe4 5e | disabled_ reason | None | ------- ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Property | Value |
+------
| cpu_info | |
| current_workload | 0 |
| disk_available_
| free_disk_gb | 0 |
| free_ram_mb | 0 |
| host_ip | 192.168.122.148 |
| hypervisor_hostname | 70b56477-
| hypervisor_type | ironic |
| hypervisor_version | 1 |
| id | 1 |
| local_gb | 0 |
| local_gb_used | 10 |
| memory_mb | 0 |
| memory_mb_used | 1024 |
| running_vms | 1 |
| service_
| service_host | devstack |
| service_id | 6 |
| state | up |
| status | enabled |
| vcpus | 0 |
| vcpus_used | 1 |
+------
This bug is caused by passing an empty string as cpu_info to jsonutils.loads in nova/api/ openstack/ compute/ hypervisors. py[2].
[1] http:// docs.openstack. org/developer/ ironic/ dev/dev- quickstart. html#deploying- ironic- with-devstack /github. com/openstack/ nova/blob/ master/ nova/api/ openstack/ compute/ hypervisors. py#L72
[2] https:/