Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 689688

Summary: Anaconda fails if .treeinfo is invalid or empty
Product: Red Hat Enterprise Linux 6 Reporter: Tristan Scott <tscott>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: akozumpl, jwest
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-22 14:25:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tristan Scott 2011-03-22 06:07:37 UTC
Description of problem:

Anaconda fails with a fatal error when it is served an empty or invalid .treeinfo file, even if it is not necessary for a given repository. This can occur if using a misconfigured HTTP server that sends an empty file or an error in HTML.


Version-Release number of selected component (if applicable):

13.21.82


How reproducible:

Very


Steps to Reproduce:

1. Create a kickstart with 2 HTTP repositories configured - one containing the OS and Anaconda, the other only RPMs (e.g. EPEL)
2. (Mis)configure HTTP server to reply with 200 to all requests (or create an empty .treeinfo file in the non-base repository)
3. Attempt to install using this kickstart 
  

Actual results:

Anaconda fails with:
15:17:58,240 CRITICAL: anaconda 13.21.82 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.6/ConfigParser.py", line 531, in get
    raise NoSectionError(section)
  File "/usr/lib/anaconda/yuminstall.py", line 666, in _getAddons
    variant = c.get("general", "variant")
  File "/usr/lib/anaconda/yuminstall.py", line 817, in doConfigSetup
    addons = self._getAddons(repo.mirrorlist or repo.baseurl[0])
  File "/usr/lib/anaconda/yuminstall.py", line 404, in setup
    self.doConfigSetup(root=self.anaconda.rootPath)
  File "/usr/lib/anaconda/yuminstall.py", line 1223, in doBackendSetup
    self.ayum.setup()
  File "/usr/lib/anaconda/backend.py", line 285, in doBackendSetup
    if anaconda.backend.doBackendSetup(anaconda) == DISPATCH_BACK:
  File "/usr/lib/anaconda/dispatch.py", line 208, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/dispatch.py", line 231, in currentStep
    self.gotoNext()
  File "/usr/lib/anaconda/text.py", line 593, in run
    (step, instance) = anaconda.dispatch.currentStep()
  File "/usr/bin/anaconda", line 1115, in <module>
    anaconda.intf.run(anaconda)
NoSectionError: No section: 'general'


Expected results:

Anaconda ignores invalid .treeinfo files when not required


Additional info:

If there is no .treeinfo file at all (or an HTTP 404 is sent), Anaconda uses the repository without a problem. However, it does not seem to handle an empty or invalid .treeinfo, even if it is not strictly required

Comment 2 Dave Cantrell 2011-03-22 14:25:26 UTC
Do not provide invalid .treeinfo files to anaconda.  Our tree compose tools already set up valid .treeinfo files for the installer.