Bug 2174912

Summary: [RFE] add ability to skip syncing .treeinfo files
Product: Red Hat Satellite Reporter: Ian Ballou <iballou>
Component: RepositoriesAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: dalley, jentrena, pcreech, rlavi, vsedmik
Target Milestone: 6.14.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:18:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2135215    
Bug Blocks:    

Description Ian Ballou 2023-03-02 15:50:54 UTC
Copy and pasted from the Pulp BZ to support this: https://bugzilla.redhat.com/show_bug.cgi?id=2135215

"""

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.

"""

Pulp added a way to skip .treeinfo file syncing. Now, Katello needs to add support for skipping them as well. We should add another check box on the repository page with an explanation of why you may want to skip syncing .treeinfo files.

This affects all Satellite versions with Pulp 3.

Here's an explanation from Grant: https://bugzilla.redhat.com/show_bug.cgi?id=2135215#c10

Comment 1 Ian Ballou 2023-04-05 16:00:26 UTC
The error from Pulp looks like: raise TypeError(_(\"Treeinfo file should have INI format\"))\n",

We can probably catch that error and tell users to skip the .treeinfo syncing.

Comment 6 Bryan Kearney 2023-05-18 00:03:11 UTC
Upstream bug assigned to iballou

Comment 7 Bryan Kearney 2023-05-18 00:03:13 UTC
Upstream bug assigned to iballou

Comment 8 Bryan Kearney 2023-05-23 20:02:57 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36411 has been resolved.

Comment 9 Vladimír Sedmík 2023-06-16 12:39:25 UTC
Verified in 6.14.0 snap 4.0.

Steps to verify:
0) Enable some RH Kickstart repo (BaseOS in case of RHEL8 and higher).
1) Set 'Ignore treeinfo' of that repository to 'Yes', try to sync it (try optimized, complete).
2) Retry with different mirroring (all but 'Complete Mirroring') and download policies.
3) Set 'Ignore treeinfo' of that repository to 'No' and resync.

Expected / observed results:
1) Sync succeeded and the RPM content was available at the Published_at url, however the treeinfo file was missing, as well as the KS related content.
2) Sync succeeded for all allowed combinations and proper validation error was shown when attempted to set 'Treeinfo ignore' && 'Complete mirroring'
3) Sync succeeded and the treeinfo file and the KS related content was synchronized.

Comment 12 errata-xmlrpc 2023-11-08 14:18:58 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