Issue #8312
closedPulp2 fails to validate file size for tgz from the manifest generated by Pulp3
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.
Updated by vatavu over 2 years ago
vatavu wrote:
Scenario:
We have a Pulp3 repo of type file
We upload in the repo from step 1 a compressed files called testFile.tgz
The upload is done with success and the PULP_MANIFEST files showa as expected.
We have a Pulp2 repo of type iso
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.
Updated by dalley over 2 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.
Updated by dalley about 2 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.
Updated by dalley about 2 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
Updated by dalley about 2 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.
Updated by dalley about 2 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.
Updated by dalley about 2 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.