Hi, one more thing. On Sun, 11 Mar 2018 13:17:47 +0100 Tomáš Golembiovský <tgolembi@redhat.com> wrote:
+ +def close(h): + global params + + http = h['http'] + connection = h['connection'] + + http.close() + + # If we didn't fail, then finalize the transfer. + if not h['failed']: + disk = h['disk'] + transfer_service=h['transfer_service'] + + transfer_service.finalize()
You need to wait for the transfer to finish before proceeding. Otherwise there is a race between disk unlocking and VM creation. Last disk may not be attached to the VM producing the following error in engine.log:
2018-03-11 20:53:44,304+01 WARN [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-28) [d04925b] EVENT_ID: VM_IMPORT_FROM_CONFIGURATION_ATTACH_DISKS_FAILED(175), VM tg-mini has been imported from the given configuration but the following disk(s) failed to attach: 0ddc46a9-8989-47a0-ae2f-18201e44cf0d.
See this code: https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload_ov... Once the transfer ceases to exist (the "pass") it is safe to continue. Tomas -- Tomáš Golembiovský <tgolembi@redhat.com>