Bug 689688 - Anaconda fails if .treeinfo is invalid or empty
Summary: Anaconda fails if .treeinfo is invalid or empty
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Anaconda Maintenance Team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-22 06:07 UTC by Tristan Scott
Modified: 2018-11-14 13:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-22 14:25:26 UTC
Target Upstream Version:


Attachments (Terms of Use)

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 David 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.


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