Getting issue in finalize section after disk successfully uploaded

I have used upload-disk.py to upload qcow2 image to data center...however getting below errror ./upload-disk.py --engine-url 'https://xyz.net' --username='xyz@abc.net' --password-file=password --sd-name='SEC-ABC' --cafile='/home/jenkins/crt/ca.crt' --disk-format="qcow2" --disk-sparse image-XYZ Checking image... Image format: qcow2 Disk format: cow Disk content type: data Disk provisioned size: 10737418240 Disk initial size: 5526847488 Disk name: image-avishek.qcow2 Connecting... Creating disk... Creating transfer session... Uploading image... [ 100.00% ] 10.00 GiB, 11.34 seconds, 903.09 MiB/s Finalizing transfer session... Traceback (most recent call last): File "./upload-disk.py", line 300, in <module> transfer_service.finalize() File "/usr/lib64/python3.6/site-packages/ovirtsdk4/services.py", line 13971, in finalize return self._internal_action(action, 'finalize', None, headers, query, wait) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 299, in _internal_action return future.wait() if wait else future File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 55, in wait return self._code(response) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 296, in callback self._check_fault(response) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 132, in _check_fault self._raise_error(response, body) File "/usr/lib64/python3.6/site-packages/ovirtsdk4/service.py", line 118, in _raise_error raise error ovirtsdk4.AuthError: Fault reason is "Operation Failed". Fault detail is "[User is not authorized to perform this action.]". HTTP response code is 403.

On Sat, Sep 4, 2021 at 10:28 PM avishek.sarkar--- via Users <users@ovirt.org> wrote:
I have used upload-disk.py to upload qcow2 image to data center...however getting below errror
./upload-disk.py --engine-url 'https://xyz.net' --username='xyz@abc.net' --password-file=password --sd-name='SEC-ABC' --cafile='/home/jenkins/crt/ca.crt' --disk-format="qcow2" --disk-sparse image-XYZ
I see that you use the user xyz@abc.net - does it work when using admin@internal? ...
Uploading image... [ 100.00% ] 10.00 GiB, 11.34 seconds, 903.09 MiB/s Finalizing transfer session... ... ovirtsdk4.AuthError: Fault reason is "Operation Failed". Fault detail is "[User is not authorized to perform this action.]". HTTP response code is 403.
This is a bug - the system allows you to start an upload, which creates a disk, but does not allow you to finalize the upload. If you can reproduce this with 4.4, please file ovirt engine bug, and we will try to fix this in a future 4.4. release. For now, you can try to modify the capabilities of the user xyz@abc.net, maybe uploading images requires some permissions which are set for this user. Avihai, do we test image transfers with a special user (not admin@internal)? Nir
participants (2)
-
avishek.sarkar@broadcom.com
-
Nir Soffer