<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Matt, sorry but I lost your answer and Gianpiero forwarded it to me.</div><div>I am sure kvm nodes names are note changed.</div><div>Tables where uuid are duplicated are:</div><div>dataresource_providers in nova_api db</div><div>compute_nodes in nova db</div><div>Regards</div><div>Ignazio<br></div><div><br></div></div></div></div></div><div class="gmail_quote">Il 28/Nov/2018 11:09 AM, "Gianpiero Ardissono" <<a href="mailto:gp.ardissono@gmail.com" target="_blank">gp.ardissono@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"></div><br><div class="gmail_quote"><div dir="ltr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Matt Riedemann</strong> <span dir="ltr"><<a href="mailto:mriedemos@gmail.com" target="_blank">mriedemos@gmail.com</a>></span><br>Date: mar 27 nov 2018, 19:03<br>Subject: Re: [Openstack-operators] Nova hypervisor uuid<br>To:  <<a href="mailto:openstack-operators@lists.openstack.org" target="_blank">openstack-operators@lists.openstack.org</a>><br></div><br><br>On 11/27/2018 11:32 AM, Ignazio Cassano wrote:<br>
> Hi  All,<br>
> Please anyone know where hypervisor uuid is retrived?<br>
> Sometime updating kmv nodes with yum update it changes and in nova <br>
> database 2 uuids are assigned to the same node.<br>
> regards<br>
> Ignazio<br>
> <br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> OpenStack-operators mailing list<br>
> <a href="mailto:OpenStack-operators@lists.openstack.org" rel="noreferrer" target="_blank">OpenStack-operators@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" rel="noreferrer noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
> <br>
<br>
To be clear, do you mean the computes_nodes.uuid column value in the <br>
cell database? Which is also used for the GET /os-hypervisors response <br>
'id' value if using microversion >= 2.53. If so, that is generated <br>
randomly* when the compute_nodes table record is created:<br>
<br>
<a href="https://github.com/openstack/nova/blob/8545ba2af7476e0884b5e7fb90965bef92d605bc/nova/compute/resource_tracker.py#L588" rel="noreferrer noreferrer" target="_blank">https://github.com/openstack/nova/blob/8545ba2af7476e0884b5e7fb90965bef92d605bc/nova/compute/resource_tracker.py#L588</a><br>
<br>
<a href="https://github.com/openstack/nova/blob/8545ba2af7476e0884b5e7fb90965bef92d605bc/nova/objects/compute_node.py#L312" rel="noreferrer noreferrer" target="_blank">https://github.com/openstack/nova/blob/8545ba2af7476e0884b5e7fb90965bef92d605bc/nova/objects/compute_node.py#L312</a><br>
<br>
When you hit this problem, are you sure the hostname on the compute host <br>
is not changing? Because when nova-compute starts up, it should look for <br>
the existing compute node record by host name and node name, which for <br>
the libvirt driver should be the same. That lookup code is here:<br>
<br>
<a href="https://github.com/openstack/nova/blob/8545ba2af7476e0884b5e7fb90965bef92d605bc/nova/compute/resource_tracker.py#L815" rel="noreferrer noreferrer" target="_blank">https://github.com/openstack/nova/blob/8545ba2af7476e0884b5e7fb90965bef92d605bc/nova/compute/resource_tracker.py#L815</a><br>
<br>
So the only way nova-compute should create a new compute_nodes table <br>
record for the same host is if the host/node name changes during the <br>
upgrade. Is the deleted value in the database the same (0) for both of <br>
those records?<br>
<br>
* The exception to this is for the ironic driver which re-uses the <br>
ironic node uuid as of this change: <a href="https://review.openstack.org/#/c/571535/" rel="noreferrer noreferrer" target="_blank">https://review.openstack.org/#/c/571535/</a><br>
<br>
-- <br>
<br>
Thanks,<br>
<br>
Matt<br>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org" rel="noreferrer" target="_blank">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" rel="noreferrer noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
</div>
</blockquote></div>