Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBS upload of large file fails (2 GB) #518

Open
headchecker opened this issue Feb 5, 2025 · 1 comment
Open

OBS upload of large file fails (2 GB) #518

headchecker opened this issue Feb 5, 2025 · 1 comment

Comments

@headchecker
Copy link

OBS upload is failing for larger file bigger 2 GB with otcextensions-0.32.8-py2

Script snippet:

import openstack
import os
conn = openstack.connect(cloud=os.environ["OS_CLOUD"])
openstack.enable_logging(True)
conn.obs.create_object(container='**MY_BUCKET**', name='deleteme', filename='/home/linux/private-image-registration/test.qcow2')

Error Message:

REQ: curl -g -i -X POST "https://***MYBUCKET***.obs.eu-de.otc.t-systems.com/test.qcow2?uploadId=00000194D64809234421F973B3193FAD?requests_auth=%3Cotcextensions.sdk.ak_auth.AKRequestsAuth+object+at+0x7fc56b66b9d0%3E" -H "User-Agent: openstacksdk/3.2.0 keystoneauth1/5.6.0 python-requests/2.32.3 CPython/3.11.2" -H "X-Auth-Token: **MY_TOKEN**" -d '<CompleteMultipartUpload><Part><PartNumber>1</PartNumber><ETag>cd573cfaace07e7949bc0c46028904ff</ETag></Part><Part><PartNumber>2</PartNumber><ETag>cd573cfaace07e7949bc0c46028904ff</ETag></Part></CompleteMultipartUpload>'
RESP: [403] Content-Length: 263 Content-Type: application/xml Date: Wed, 05 Feb 2025 13:24:12 GMT Server: OBS x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA x-obs-request-id: 00000194D648569F442153E3C7BA5D76 x-reserved-indicator: 372
RESP BODY: Omitted, Content-Type is set to application/xml. Only text/plain, application/json responses have their bodies logged.
Failed to upload large object for 00000194D64809234421F973B3193FAD. Aborting uploads.
REQ: curl -g -i -X DELETE https://***MYBUCKET***.obs.eu-de.otc.t-systems.com/test.qcow2?uploadId=00000194D64809234421F973B3193FAD -H "User-Agent: openstacksdk/3.2.0 keystoneauth1/5.6.0 python-requests/2.32.3 CPython/3.11.2" -H "X-Auth-Token: **MY_TOKEN**"
RESP: [204] Date: Wed, 05 Feb 2025 13:24:12 GMT Server: OBS x-amz-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA x-amz-request-id: 00000194D64856B2442153F730530FC4 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
RESP BODY: Omitted, Content-Type is set to None. Only text/plain, application/json responses have their bodies logged.
Traceback (most recent call last):
  File "/home/linux/private-image-registration/obs.py", line 5, in <module>
    conn.obs.create_object(container='***MYBUCKET***', name='deleteme', filename='/home/linux/private-image-registration/test.qcow2')
  File "/home/linux/private-image-registration/.venv/lib/python3.11/site-packages/otcextensions/sdk/obs/v1/_proxy.py", line 409, in create_object
    self._upload_large_object(
  File "/home/linux/private-image-registration/.venv/lib/python3.11/site-packages/otcextensions/sdk/obs/v1/_proxy.py", line 490, in _upload_large_object
    return self._finish_large_object_upload(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/linux/private-image-registration/.venv/lib/python3.11/site-packages/otcextensions/sdk/obs/v1/_proxy.py", line 515, in _finish_large_object_upload
    return exceptions.raise_from_response(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/linux/private-image-registration/.venv/lib/python3.11/site-packages/otcextensions/common/exc.py", line 286, in raise_from_response
    raise cls(
openstack.exceptions.HttpException: Forbidden: Client Error for url: https://***MYBUCKET***.obs.eu-de.otc.t-systems.com/test.qcow2?uploadId=00000194D64809234421F973B3193FAD&requests_auth=%3Cotcextensions.sdk.ak_auth.AKRequestsAuth+object+at+0x7fc56b66b9d0%3E, Forbidden
@anton-sidelnikov anton-sidelnikov added bug Something isn't working and removed bug Something isn't working labels Feb 6, 2025
@anton-sidelnikov
Copy link
Member

Hi @headchecker, the problem in ak sk stored in environment variables, please remove it and use password auth, ak/sk requests limited to 14mb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants