Hello,

when i tried to attach a snapshot disk into my backupvm. oVirt doesn't want to 
attach it.
In the engine.log I can see this.

2018-08-04 19:20:04,472-10 ERROR 
[org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand] (default 
task-33) [646ad7a1-4501-4648-a937-bbee0abaec46] Command 
'org.ovirt.engine.core.bll.storage.disk.AttachDiskToVmCommand' failed: 
CallableStatementCallback; SQL [{call insertdiskvmelement(?, ?, ?, ?, ?, ?)}]; 
ERROR: duplicate key value violates unique constraint "pk_disk_vm_element"
  Detail: Key (vm_id, disk_id)=(78ef239f-3cb3-4eef-921f-f989724009ef, 
c7cef731-e31d-4597-80f1-1f2393cd66ea) already exists.
  Where: SQL statement "INSERT INTO disk_vm_element (
        disk_id,
        vm_id,
        is_boot,
        pass_discard,
        disk_interface,
        is_using_scsi_reservation)
    VALUES (
        v_disk_id,
        v_vm_id,
        v_is_boot,
        v_pass_discard,
        v_disk_interface,
        v_is_using_scsi_reservation)"
PL/pgSQL function insertdiskvmelement(uuid,uuid,boolean,boolean,character 
varying,boolean) line 3 at SQL statement; nested exception is 
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique 
constraint "pk_disk_vm_element"
  Detail: Key (vm_id, disk_id)=(78ef239f-3cb3-4eef-921f-f989724009ef, 
c7cef731-e31d-4597-80f1-1f2393cd66ea) already exists.


When i SQL the database, the entries is present (and many other). But in the 
webinterface, I can't see them on the backupVM. It's just like ovirt didn't 
delete old entries

engine=# select * from disk_vm_element where vm_id = 
'78ef239f-3cb3-4eef-921f-f989724009ef' and disk_id = 
'c7cef731-e31d-4597-80f1-1f2393cd66ea' ;
               disk_id                |                vm_id                 | 
is_boot | disk_interface | is_using_scsi_reservation | pass_discard
--------------------------------------+--------------------------------------+---------+----------------+---------------------------+--------------
 c7cef731-e31d-4597-80f1-1f2393cd66ea | 78ef239f-3cb3-4eef-921f-f989724009ef | 
f       | VirtIO         | f                         | f
(1 row)

Do you guys have any idea on how to correct this ?

Is there any function to update / refresh this table ?
I dont want to delete entries by sql as i  don't know the consequences, is it 
safe to delete entries ?

Thank you for your help
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/PXGZ62TGLMO7PTBKVPSTZCEBRAW2L5QK/

Reply via email to