vmware-archive / pyvcloud

Python SDK for VMware vCloud Director
https://vmware.github.io/pyvcloud
Other
170 stars 190 forks source link

Upload_OVF fails when uploading larger OVA files #310

Open llyubenov opened 6 years ago

llyubenov commented 6 years ago

Upload_ovf function seems to randomly fails when trying to upload large (1gb+) OVA files.

The pyvcloud.log shows a lot of 416 responses and the upload fails with "Reached max retry limit. Failing upload." message:

2018-10-31 18:36:15,909 | DEBUG | pyvcloud.vcd.cl | client | upload_fragm | Failure: attempt#4 to upload data in range bytes 398458880-408944639/3771115520 failed. Retrying. 2018-10-31 18:36:15,970 | DEBUG | pyvcloud.vcd.cl | client | _log_request | Request uri (PUT): https://uswest2-vlp01.oc.vmware.com/transfer/efbdcbf7-feea-442f-9a7d-0c0b51f8337a/vm-3fd30f2a-ec45-4853-9112-9b96e7f25881-disk-0.vmdk 2018-10-31 18:36:15,970 | DEBUG | pyvcloud.vcd.cl | client | _log_request | Request headers: {'User-Agent': 'python-requests/2.20.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'x-vcloud-authorization': '40eb6c3a33bc4e75a93d2156a843f44f', 'Content-Range': 'bytes 398458880-408944639/3771115520', 'Content-Length': '10485760'} 2018-10-31 18:36:15,970 | DEBUG | pyvcloud.vcd.cl | client | _log_request | Response status code: 416 2018-10-31 18:36:15,970 | DEBUG | pyvcloud.vcd.cl | client | _log_request | Response headers: {'Date': 'Wed, 31 Oct 2018 18:36:15 GMT', 'Content-Length': '0', 'Connection': 'keep-alive'} 2018-10-31 18:36:15,970 | ERROR | pyvcloud.vcd.cl | client | upload_fragm | Reached max retry limit. Failing upload.

pandeys commented 5 years ago

Is this operation successful in VCD but failed in pyvcloud?