Bug #17758
openhandle variables in listing files by ignoring
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1395277
Description of problem:
The cdn mistakenly put '$basearch' into a listing file at:
https://cdn.redhat.com/content/dist/rhel/server/7/7.2/listing
And katello does not handle that as it is trying to do variable substitution.
It ends up just requesting
https://cdn.redhat.com/content/dist/rhel/server/7/7.2/listing
over and over and over forever. This is likely due to
1. Katello taking the url https://cdn.redhat.com/content/dist/rhel/server/7/7.2/ and appending $basearch
2. Performing variable substitution on https://cdn.redhat.com/content/dist/rhel/server/7/7.2/$basearch, resulting in https://cdn.redhat.com/content/dist/rhel/server/7/7.2/
3. Katello fetching https://cdn.redhat.com/content/dist/rhel/server/7/7.2/listing again, and repeating at step 1.
Version-Release number of selected component (if applicable):
All versions of katello
How reproducible:
Always (with a broken CDN)
Steps to Reproduce:
1. Setup a cdn mirror and add '$basearch' to one of the listing files
2. Try to list repos to enable on the redhat repos page that fetches that listing file
Actual results:
Request hangs and list just shows spinner
Expected results:
repos listed