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

Fix mirror=True not including files declared in .treeinfo in publication #2088

Merged
merged 1 commit into from
Aug 24, 2021

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Aug 22, 2021

@dralley
Copy link
Contributor Author

dralley commented Aug 22, 2021

CI likely to fail for same reason as here: #2087 (comment)

publish_data = RpmRpmPublication(repository=repo.pulp_href)
publish_response = self.publications.create(publish_data)
created_resources = monitor_task(publish_response.task).created_resources
publication_href = created_resources[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Epic fail, this wasn't actually testing the mirrored publication :( I was doing testing manually also so nothing was missed, and the test wouldn't have caught this, but still.

@dralley dralley force-pushed the kickstart-fixes branch 2 times, most recently from 66f2e60 to f03baf8 Compare August 22, 2021 02:46
@pulpbot
Copy link
Member

pulpbot commented Aug 22, 2021

Attached issue: https://pulp.plan.io/issues/9230

@dralley
Copy link
Contributor Author

dralley commented Aug 22, 2021

According to https://github.com/pulp/pulp_rpm/blob/2-master/plugins/pulp_rpm/plugins/importers/yum/parse/treeinfo.py#L542-L565, we may need to also handle the possibility of files not present in checksums but declared elsewhere.

We're also missing discinfo and EFI/* because neither they nor their contents are declared in any metadata files. Do we need to be concerned about those? What are they used for? (They 100% aren't part of any normal publishes so if we haven't heard anything yet we're probably OK)

Lastly I noticed that if I actually download the file with http I get the following

(pulp) (pulp) [vagrant@pulp3-source-fedora34 devel]$ http GET :24816/pulp/content/test/images/pxeboot/vmlinuz
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Encoding: gzip
Content-Type: text/plain
Date: Sun, 22 Aug 2021 03:15:11 GMT
EJ-HOST: authorizer-prod-dc-us-east-20-c27lh
Etag: "3b95cceb4a3d43e1ce9cd7beda8e3f4f:1620737008.051679"
Last-Modified: Thu, 29 Apr 2021 13:03:45 GMT
Server: AkamaiNetStorage
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Akamai-Request-ID: e01bfe4
X-Cache: TCP_HIT from a23-43-58-101.deploy.akamaitechnologies.com (AkamaiGHost/10.4.4-34529956) (-)


http: error: ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check'))

If I download from Pulp with wget then it works - and then afterwards downloading with httpie works fine. I suspect I may have figured out the cause of https://pulp.plan.io/issues/9213 - perhaps we forward the headers when streaming the content, including TransferEncoding, but we're decompressing in the middle. Which would explain why it was trying to un-gzip data that isn't gzipped, and might explain the size discrepancy.

Copy link
Member

@goosemania goosemania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@dralley dralley merged commit 94164ed into pulp:master Aug 24, 2021
@dralley dralley deleted the kickstart-fixes branch August 24, 2021 18:04
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

Successfully merging this pull request may close these issues.

3 participants