Azure upload might fail with: LeaseLost
I've seen once the following error condition:
2022-05-03 14:56:15,985 DEBUG uploading start=6719266816, size=3842048
2022-05-03 14:56:16,188 DEBUG https://fzeb6tm0puex4exxjnw5.blob.core.windows.net:443 "PUT /debian-sid-test/sid:amd64:0.20220503.1.vhd?comp=lease HTTP/1.1" 200 0
2022-05-03 14:57:16,221 DEBUG Incremented Retry for (url='/debian-sid-test/sid:amd64:0.20220503.1.vhd?comp=page'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
2022-05-03 14:57:16,229 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', TimeoutError('The write operation timed out'))': /debian-sid-test/sid:amd64:0.20220503.1.vhd?comp=page
2022-05-03 14:57:16,229 DEBUG Starting new HTTPS connection (2): fzeb6tm0puex4exxjnw5.blob.core.windows.net:443
2022-05-03 14:57:23,712 DEBUG https://fzeb6tm0puex4exxjnw5.blob.core.windows.net:443 "PUT /debian-sid-test/sid:amd64:0.20220503.1.vhd?comp=page HTTP/1.1" 412 243
2022-05-03 14:57:23,980 DEBUG https://fzeb6tm0puex4exxjnw5.blob.core.windows.net:443 "PUT /debian-sid-test/sid:amd64:0.20220503.1.vhd?comp=lease HTTP/1.1" 200 0
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/bastian/debian/cloud/images/src/debian_cloud_images/cli/__main__.py", line 51, in <module>
main()
File "/home/bastian/debian/cloud/images/src/debian_cloud_images/cli/__main__.py", line 44, in main
args.cls(argparser=parser, **vars(args))()
File "/home/bastian/debian/cloud/images/src/debian_cloud_images/cli/upload_azure_partner.py", line 146, in __call__
image_blob.put(f)
File "/home/bastian/debian/cloud/images/src/debian_cloud_images/images/azure_storage/s2_blob.py", line 92, in put
self.put_chunk(lease, chunk)
File "/home/bastian/debian/cloud/images/src/debian_cloud_images/images/azure_storage/s2_blob.py", line 107, in put_chunk
r = self.__request(
File "/home/bastian/debian/cloud/images/src/debian_cloud_images/images/azure_storage/s2_blob.py", line 62, in __request
return self.__driver_storage.connection.request(self.path, method=method, data=data, headers=headers, params=params)
File "/usr/lib/python3/dist-packages/libcloud/common/azure_arm.py", line 227, in request
return super(AzureResourceManagementConnection, self) \
File "/usr/lib/python3/dist-packages/libcloud/common/base.py", line 667, in request
response = responseCls(**kwargs)
File "/usr/lib/python3/dist-packages/libcloud/common/base.py", line 167, in __init__
message=self.parse_error(),
File "/usr/lib/python3/dist-packages/libcloud/common/azure.py", line 86, in parse_error
raise LibcloudError(
libcloud.common.types.LibcloudError: <LibcloudError in <libcloud.common.azure.AzureResponse object at 0x7f2c0b0a3550> 'LeaseLost: A lease ID was specified, but the lease for the blob has expired. Status code: 412.'>