<div dir="ltr"><div>Hi Matt,</div><div>I did in the DB directly.</div><div>I am using queens now.</div><div>Any python client command to delete hold records or I must use api ?</div><div><br></div><div>Thanks & Regards</div><div>Ignazio<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno gio 29 nov 2018 alle ore 16:28 Matt Riedemann <<a href="mailto:mriedemos@gmail.com">mriedemos@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 11/29/2018 12:49 AM, Ignazio Cassano wrote:<br>
> Hello Mattm<br>
> Yes I mean sometimes I have same host/node names with different uuid in <br>
> compute_nodes table in nova database<br>
> I must delete nodes with uuid those not match with nova-hypervisor list <br>
> command.<br>
> At this time I have the following:<br>
> MariaDB [nova]> select hypervisor_hostname,uuid,deleted from compute_nodes;<br>
> +---------------------+--------------------------------------+---------+<br>
> | hypervisor_hostname | uuid                                 | deleted |<br>
> +---------------------+--------------------------------------+---------+<br>
> | tst2-kvm02          | 802b21c2-11fb-4426-86b9-bf25c8a5ae1d |       0 |<br>
> | tst2-kvm01          | ce27803b-06cd-44a7-b927-1fa42c813b0f |       0 |<br>
> +---------------------+--------------------------------------+---------+<br>
> 2 rows in set (0,00 sec)<br>
> <br>
> <br>
> But sometimes old uuid are inserted in the table .<br>
> I deleted again them.<br>
> I restarted kvm nodes and now the table is ok.<br>
> I also restarded each controller and the tables is ok.<br>
> I do not know because 3 days ago I had same compute nodes names with <br>
> different uuids.<br>
> <br>
> Thanks and Regards<br>
> Ignazio<br>
<br>
OK I guess if it happens again, please get the <br>
host/hypervisor_hostname/uuid/deleted values from the compute_nodes <br>
table before you cleanup any entries.<br>
<br>
Also, when you're deleting the resources from the DB, are you doing it <br>
in the DB directly or via the DELETE /os-services/{service_id} API? <br>
Because the latter cleans up other related resources to the nova-compute <br>
service (the services table record, the compute_nodes table record, the <br>
related resource_providers table record in placement, and the <br>
host_mappings table record in the nova API DB). The resource <br>
provider/host mappings cleanup when deleting a compute service is a more <br>
recent bug fix though which depending on your release you might not have:<br>
<br>
<a href="https://review.openstack.org/#/q/I7b8622b178d5043ed1556d7bdceaf60f47e5ac80" rel="noreferrer" target="_blank">https://review.openstack.org/#/q/I7b8622b178d5043ed1556d7bdceaf60f47e5ac80</a><br>
<br>
-- <br>
<br>
Thanks,<br>
<br>
Matt<br>
</blockquote></div>