[ovirt-users] Orphaned record in the engine DB prevents host removal

Federico Alberto Sayd fsayd at uncu.edu.ar
Fri Jul 4 18:15:37 UTC 2014


On 04/07/14 12:07, Federico Alberto Sayd wrote:
> Hello People:
>
> I am trying to remove a host from ovirt-engine but I have found that a 
> orphaned record in the engine DB prevents the removal of the host.
> The host is in maintenance mode, it doesn't have vm's running on it.
> The engine logs says that there is a reference to the id of the host
> (vds_id in the table vds_static) in the field "migrating_to_vds" in 
> the table "dynamic_vds". Obviously this is a orphaned record, but a 
> constraint in the table "dynamic_vds" prevents the removal of the host.
> How can I solve this?
> Someone that knows the internals of engine's DB that can confirm if I 
> can remove the problematic registry in order to remove the host?? 
> Another solution?
>
> I really need to remove this host. Please help and
>
> Thanks!
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
>
Well, I solved the problem of host removal, some of reverse engineering 
over the DB structure and I can solve the problem.

For any reason that I don't know, I migrated a vm from a host to other 
host in the cluster, but in the table vm_dynamic that apparently 
contains the dynamic values of vm's, the field "migrating_to_vds" was 
not updated and still held the id of the vds (node, hypervisor, host, 
etc.) which was migrated from. Same host that I had put in maintenance 
in order to remove it.

I guess that the right behaviour is  update the "migrating_to_vds" field 
with the vm_guid of the vds (node, hypervisor) to which the vm is being 
migrated. But, I don't know what was wrong when the vm was migrated and 
therefore the value was not updated.

Simply I took the vds id from the error in engine.log, searched in the 
vd_dynamic table a row with this value in the field "migrating_to_vds" 
then I retrieved from the same row the value of the vm id from the field 
"vm_guid", then I searched in the table "vd_static" the name of the vm 
with such vm_guid. Then from the engine interface I migrated again this 
vm and the value in the field "migrating_to_vds" was correctly updated 
with the guid of the destination host. Then, the engine doesn't 
complaint anymore and I could remove the host.

The question is, why did not the migration update the value of 
"migrating_to_vds" field in the table vm_dynamic or did incorrectly 
update it??

Sorry if you don't understand all above, I don't write very well in 
English, and it is a bit painful to try to explain this situation in 
other language..!

Regards

Federico



More information about the Users mailing list