Project

Profile

Help

Issue #8312

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

Added by vatavu 7 months ago. Updated 5 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
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.

History

#1 Updated by vatavu 7 months 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.

#2 Updated by daviddavis 7 months ago

  • Tags Pulp 2 added

#3 Updated by daviddavis 7 months ago

  • Tags deleted (Pulp 2)

#4 Updated by jsherril@redhat.com 7 months ago

  • Tags Katello added

#5 Updated by dalley 7 months 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.

#6 Updated by ttereshc 7 months ago

  • Description updated (diff)

pre'd

#8 Updated by ttereshc 7 months ago

  • Triaged changed from No to Yes

#9 Updated by dalley 6 months 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

#10 Updated by dalley 6 months 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

#11 Updated by dalley 5 months ago

  • Status changed from NEW to CLOSED - WORKSFORME

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

#12 Updated by dalley 5 months 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.

#13 Updated by dalley 5 months 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.

Please register to edit this issue

Also available in: Atom PDF