Project

Profile

Help

Issue #8312

closed

Pulp2 fails to validate file size for tgz from the manifest generated by Pulp3

Added by vatavu about 3 years ago. Updated almost 3 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Quarter:

Description

Scenario:

1.We have a Pulp3 repo of type file
2.We upload in the repo from step 1 a compressed files called testFile.tgz
3.The upload is done with success and the PULP_MANIFEST files showa as expected.
4.We have a Pulp2 repo of type iso
5.The Pulp2 repo tries to sync from Pulp3 repo.

Expected result:

Sync should complete with success as it is the case for any other type of files
Actual result:
Sync fails with the following error:
*Downloading the Pulp Manifest...

Task Failed

[{'name': u'k8s-db-manager/k8s-db-manager-0.0.0.tgz', 'error': 'Downloading  
<k8s-db-manager/k8s-db-manager-0.0.0.tgz> failed validation. The manifest  
specified that the file should be 1646 bytes, but the downloaded file is 5120  
bytes.'}]* 

To be noticed that the tgz size is 1646 bytes indeed but the content of the tgz file is 5120 bytes.

Notice: Using tar.gz compression works as expected.

Actions #1

Updated by vatavu about 3 years ago

vatavu wrote:

Scenario:

  1. We have a Pulp3 repo of type file

  2. We upload in the repo from step 1 a compressed files called testFile.tgz

  3. The upload is done with success and the PULP_MANIFEST files showa as expected.

  4. We have a Pulp2 repo of type iso

  5. The Pulp2 repo tries to sync from Pulp3 repo.

Expected result: Sync should complete with success as it is the case for any other type of files

Actual result: Sync fails with the following error:

*Downloading the Pulp Manifest...

Task Failed

[{'name': u'k8s-db-manager/k8s-db-manager-0.0.0.tgz', 'error': 'Downloading <k8s-db-manager/k8s-db-manager-0.0.0.tgz> failed validation. The manifest specified that the file should be 1646 bytes, but the downloaded file is 5120 bytes.'}]*

To be noticed that the tgz size is 1646 bytes indeed but the content of the tgz file is 5120 bytes.

Notice: Using tar.gz compression works as expected.

Actions #2

Updated by daviddavis about 3 years ago

  • Tags Pulp 2 added
Actions #3

Updated by daviddavis about 3 years ago

  • Tags deleted (Pulp 2)
Actions #4

Updated by jsherril@redhat.com about 3 years ago

  • Tags Katello added
Actions #5

Updated by dalley about 3 years ago

This is probably the client (pulp2 in this case) trying to auto-extract the contents based on the HTTP headers, or something along those lines.

Actions #6

Updated by ttereshc about 3 years ago

  • Description updated (diff)

pre'd

Actions #8

Updated by ttereshc about 3 years ago

  • Triaged changed from No to Yes
Actions #9

Updated by dalley about 3 years ago

Hi @vatavu.

We had an issue like this about a year ago, that was resolved [0]. How old is this particular installation of Pulp? Could you provide us with the versions of the Pulp 2 and Pulp 3 packages?

I tried this on the most recent Pulp, and was unable to reproduce. I suspect that you are on version 3.4, if you are experiencing this issue.

[0] https://pulp.plan.io/issues/6831

Actions #10

Updated by dalley about 3 years ago

If that's not the case, please paste what you see when you run "curl --head $file" for .tar.gz and .tgz files served by Pulp 3.

(pulp) [vagrant@pulp3-source-fedora33 devel]$ curl --head http://localhost:24816/pulp/content/tgz_test/test.tgz
HTTP/1.1 200 OK
Content-Type: application/x-tar
Last-Modified: Wed, 14 Apr 2021 00:22:24 GMT
Content-Length: 195979
Accept-Ranges: bytes
Date: Wed, 14 Apr 2021 00:37:02 GMT
Server: Python/3.9 aiohttp/3.7.4.post0

(pulp) [vagrant@pulp3-source-fedora33 devel]$ curl --head http://localhost:24816/pulp/content/tgz_test/test.tar.gz
HTTP/1.1 200 OK
Content-Type: application/x-tar
Last-Modified: Wed, 14 Apr 2021 00:22:24 GMT
Content-Length: 195979
Accept-Ranges: bytes
Date: Wed, 14 Apr 2021 00:37:10 GMT
Actions #11

Updated by dalley almost 3 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

Please re-open if you're still encountering this issue, on a recent version of Pulpcore.

Actions #12

Updated by dalley almost 3 years ago

  • Status changed from CLOSED - WORKSFORME to NEW

I'll re-open in case we want to assign it to Pulp 2, once someone gets a chance to test.

Actions #13

Updated by dalley almost 3 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

@ipanova tested this with Pulp 2, and was not able to reproduce. As mentioned previously, if you still encounter this after upgrading, please re-open and provide us with version information.

Also available in: Atom PDF