Upload a disk via the python tools: $ ./upload_disk.py -c OV --disk-format raw --sd-name STORAGE 6914eec5-6e89-46ad-aa44-e545de7e296b.1b60a0c1-76e9-4cdc-ab67-a1af8430cf2f.202 206021456.full.qcow2 [ 0.0 ] Checking image... [ 0.0 ] Image format: qcow2 [ 0.0 ] Disk format: raw [ 0.0 ] Disk content type: data [ 0.0 ] Disk provisioned size: 2147483648 [ 0.0 ] Disk initial size: 2147483648 [ 0.0 ] Disk name: 6914eec5-6e89-46ad-aa44-e545de7e296b.1b60a0c1-76e9-4cdc-ab67-a1af8430cf2f.202206021456.full.raw [ 0.0 ] Disk backup: False [ 0.0 ] Connecting... [ 0.0 ] Creating disk... [ 16.4 ] Disk ID: 33396852-743f-46e2-bcc4-013b04ec9b2a [ 16.4 ] Creating image transfer... [ 18.1 ] Transfer ID: 1199d383-8eb9-4e95-bc14-31f6551fe25b [ 18.1 ] Transfer host name: xxxxxx [ 18.1 ] Uploading image... [ 100.00% ] 2.00 GiB, 2.88 seconds, 711.54 MiB/s [ 21.0 ] Finalizing image transfer... [ 23.0 ] Upload completed successfully And then uploading the disk with the disk-id specified (as displayed above) $ ./upload_disk.py -c OV --disk-format raw --disk-id 33396852-743f-46e2-bcc4-013b04ec9b2a --sd-name STORAGE 6914eec5-6e89-46ad-aa44-e545de 7e296b.c50753d4-9897-42d5-be5b-c7c58325e0d3.202206021534.diff.qcow2 [ 0.0 ] Checking image... [ 0.0 ] Image format: qcow2 [ 0.0 ] Disk format: raw [ 0.0 ] Disk content type: data [ 0.0 ] Disk provisioned size: 2147483648 [ 0.0 ] Disk initial size: 2147483648 [ 0.0 ] Disk name: 6914eec5-6e89-46ad-aa44-e545de7e296b.c50753d4-9897-42d5-be5b-c7c58325e0d3.202206021534.diff.raw [ 0.0 ] Disk backup: False [ 0.0 ] Connecting... [ 0.0 ] Creating disk... Traceback (most recent call last): This causes the following error in oVirt: 2022-06-09 11:34:07,033+02 ERROR [org.ovirt.engine.core.bll.storage.disk.AddDiskCommand] (default task-303) [6aacac59-b539-480d-b43f-23d068408496] Command 'org.ovirt.engine.core.bll.storage.disk.AddDiskCommand' failed: CallableStatementCallback; SQL [{call insertpermission(?, ?, ?, ?, ?)}ERROR: duplicate key value violates unique constraint "idx_combined_ad_role_object" Detail: Key (ad_element_id, role_id, object_id)=(7740299e-9b9c-11ec-b93c-00505697d7a8, def0000a-0000-0000-0000-def00000000b, 33396852-743f-46e2-bcc4-013b04ec9b2a) already exists. Where: SQL statement "INSERT INTO permissions ( ad_element_id, id, role_id, object_id, object_type_id ) VALUES ( v_ad_element_id, v_id, v_role_id, v_object_id, v_object_type_id )" PL/pgSQL function insertpermission(uuid,uuid,uuid,uuid,integer) line 3 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "idx_combined_ad_role_object" And resulting in a failed disk creation + a locked image. This should have been resolved by https://gerrit.ovirt.org/c/ovirt-engine/+/114134/ But it seems like the check is not complete enough here :)
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.
What is the type of the storage domain you upload the image to?
Storage domain is a DATA/iSCSI domain
Seems like we validate the uniqueness of the image-id but not that of the image-group-id (disk id), need to add a similar validation then
Verified. Operation fails with a proper error: 2022-07-25 15:04:25,280+03 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-13) [] Operation Failed: [Cannot add Virtual Disk. The selected disk ID: <disk-id> is already used by the following existing disk: <disk-name>.] Versions: engine-4.5.2-0.3.el8ev.noarch vdsm-4.50.2.1-1.el8ev.x86_64
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.2 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.