Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2135215 - [RFE] Ignoring malformed treeinfo files including incorrect web server replies
Summary: [RFE] Ignoring malformed treeinfo files including incorrect web server replies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.11.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.14.0
Assignee: satellite6-bugs
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
Depends On:
Blocks: 2174912
TreeView+ depends on / blocked
 
Reported: 2022-10-17 05:14 UTC by Alexey Masolov
Modified: 2024-10-26 07:48 UTC (History)
13 users (show)

Fixed In Version: pulp-rpm-3.18.10
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:18:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pulp pulp_rpm issues 2848 0 None closed Provide a toggle to disable distribution tree / kickstart syncing 2023-03-02 15:04:58 UTC
Red Hat Issue Tracker SAT-15130 0 None None None 2023-01-25 13:33:02 UTC
Red Hat Knowledge Base (Solution) 7033396 0 None None None 2023-09-14 15:07:39 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:18:20 UTC

Description Alexey Masolov 2022-10-17 05:14:31 UTC
Description of problem:
Some web servers are configured to redirect on a 404 error while requesting .treeinfo or treeinfo files. Pulp3 expects a file or a 404 error and complains if it is something else:

Katello::Errors::Pulp3Error: Treeinfo file should have INI format

Although it's not a pulp3 fault. As it was described in https://bugzilla.redhat.com/show_bug.cgi?id=2046195#c1 such web servers are misconfigured. However, we should have an option to ignore such replies or all malformed treeinfo files to continue syncing such repositories.

See more details in the BZ mentioned above.

Comment 7 Daniel Alley 2022-10-31 15:50:36 UTC
Attaching an issue for allowing the disablement of .treeinfo handling.  Faced with misbehaving webservers that lie about having a .treeinfo file, this is probably the best workaround.

In this specific case I'm still waiting to here back from the vendor about fixing their configuration.

https://github.com/pulp/pulp_rpm/issues/2848

Comment 8 Daniel Alley 2023-01-25 13:55:42 UTC
Ian, what do you think about having an option available in the UI which controls whether or not kickstart metadata is synced?  How is this handled for SRPMs, is it also a checkbox or is it a manually-typed list of skippable types?

Comment 9 Ian Ballou 2023-01-26 18:35:12 UTC
Daniel, the SRPM ignoring is done in the UI via a checkbox. We could add another checkbox for ignoring kickstart media. Will users know to ignore kickstart media when they see this treeinfo error?

Comment 10 Grant Gainey 2023-01-26 21:15:28 UTC
(In reply to Ian Ballou from comment #9)
> Daniel, the SRPM ignoring is done in the UI via a checkbox. We could add
> another checkbox for ignoring kickstart media. Will users know to ignore
> kickstart media when they see this treeinfo error?

The short answer is "possibly/probably no", because the particular use-case that generated the error here arises from a misconfigured upstream-remote and shouldn't happen often.

There are four use-cases I can imagine for a user wanting to check a "skip kickstart-trees" box:

* You don't use kickstarts, and want to save time/space on sync and storage. User would know what the box means.

* You use kickstart trees, but your remote has a bad file/image which throws an obvious "checksum mismatch" error on failed syncs. User would probably be able to know to a) check this box and retry while b) yelling at their upstream about their content being broken. (This is the orginating error for pulp issue #2848)

* You use kickstart trees, but your remote has a malformed **treeinfo** file. You get the error listed here, and then do a) and b) above.

* The remote you're syncing from **doesn't have a kickstart treeinfo**, but cheerfully lies about it, returning a "200 found" while handing back a random piece of HTML saying "Not Found". This is the use-case that resulted in this BZ. User may or may not have any idea what's going on - the remote doesn't have a kickstart tree, why would I check this box? This kind of misconfiguration is rare.

I would give such a box a "break in case of..." description associated with it.

Comment 11 Robin Chan 2023-03-02 15:04:59 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 12 Robin Chan 2023-03-02 15:05:02 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 13 Daniel Alley 2023-03-02 15:21:15 UTC
Ian, is there a BZ filed for a checkbox which allows omitting treeinfo metadata from the sync?

Comment 14 Daniel Alley 2023-03-02 15:21:57 UTC
(re: comment #9)

Comment 15 Ian Ballou 2023-03-02 15:52:08 UTC
BZ for Satellite side: https://bugzilla.redhat.com/show_bug.cgi?id=2174912

Comment 16 Daniel Alley 2023-03-21 19:57:12 UTC
*** Bug 2176870 has been marked as a duplicate of this bug. ***

Comment 17 Daniel Alley 2023-03-23 14:21:22 UTC
This BZ and https://bugzilla.redhat.com/show_bug.cgi?id=2174912 can be verified at the same time by using this new mechanism.

Comment 22 Vladimír Sedmík 2023-06-16 12:37:24 UTC
Verified in 6.14.0 snap 4.0.

Steps to verify:
1) Create a product and repo with upstream url from comment#2, try to sync it (try optimized, complete).
2) Set 'Ignore treeinfo' of that repository to 'Yes', try to sync it.
3) Retry with different mirroring (all but 'Complete Mirroring') and download policies.

Expected / observed results:
1) A decent descriptive error message was shown:
   "This repository has a malformed or inaccessible treeinfo file. To sync, try enabling 'Ignore treeinfo'. All kickstart contents will be skipped."
2) Sync succeeded and the RPM content was available at the Published_at url.
3) Sync succeeded for all allowed combinations and proper validation error was shown when attempted to set 'Treeinfo ignore' && 'Complete mirroring'

Comment 25 errata-xmlrpc 2023-11-08 14:18:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.14 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6818


Note You need to log in before you can comment on or make changes to this bug.