pulp / pulp/pulpcore

Certain versions of boto3 trigger MissingContentLength errors when uploading to S3

Open
#6,469 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
598
Forks
168
Avg merge
1d 4h
Merged PRs (30d)
86

Description

After updating my Pulp to 3.74.1, pulp.squeezer.rpm_sync fails with:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Exception: Task failed to complete. (failed; An error occurred (MissingContentLength) when calling the UploadPart operation: You must provide the Content-Length HTTP header.)
failed: [127.0.0.1] (item={'name': 'elrepo-kernel-el9-x86_64', 'url': 'https://elrepo.org/linux/kernel/el9/x86_64/', 'gpgkey': 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org', 'path': 'elrepo/kernel/el9/x86_64'}) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "item": {"gpgkey": "https://www.elrepo.org/RPM-GPG-KEY-elrepo.org", "name": "elrepo-kernel-el9-x86_64", "path": "elrepo/kernel/el9/x86_64", "url": "https://elrepo.org/linux/kernel/el9/x86_64/"}, "msg": "Task failed to complete. (failed; An error occurred (MissingContentLength) when calling the UploadPart operation: You must provide the Content-Length HTTP header.)"}

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Exception: Task failed to complete. (failed; An error occurred (MissingContentLength) when calling the PutObject operation: You must provide the Content-Length HTTP header.)
failed: [127.0.0.1] (item={'name': 'fedora-8-epel-x86_64', 'url': 'http://ftp.fau.de/epel/8/Everything/x86_64/', 'gpgkey': 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8', 'path': 'epel/8/x86_64'}) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "item": {"gpgkey": "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8", "name": "fedora-8-epel-x86_64", "path": "epel/8/x86_64", "url": "http://ftp.fau.de/epel/8/Everything/x86_64/"}, "msg": "Task failed to complete. (failed; An error occurred (MissingContentLength) when calling the PutObject operation: You must provide the Content-Length HTTP header.)"}
Package                    Version
-------------------------- ---------------
ansible-compat             25.1.5
ansible-core               2.17.10
pulp-glue                  0.29.3

pulp.squeezer 0.0.17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pulp.squeezer.rpm_sync with the listed package versions and trace the S3 UploadPart and PutObject requests that raise MissingContentLength. Done means the reported RPM synchronization uploads complete successfully without either error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.