Removing a hypervisor doesn't delete it entirely
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nova (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When removing a host (because it got rebuilt, for example), we use:
openstack compute service delete <someid>
I expected that to remove the hostname cleanly from the database (or at least mark it as deleted) so that the hostname can be re-used. This isn't the case, the host remained in the nova_api database in the resource_providers table, and therefore could not be re-used.
Starting nova-compute on the host in this state resulted in:
2019-03-18 22:48:26.023 62597 ERROR nova.scheduler.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
2019-03-18 22:48:26.024 62597 ERROR nova.compute.
I was unable to clear the database entry:
mysql> delete from resource_providers where name='host22.maas';
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`nova_
I did, in the end, rename the host info in the table which allowed me to continue:
update resource_providers set name='host22.
no longer affects: | charm-nova-cloud-controller |
Status changed to 'Confirmed' because the bug affects multiple users.