Bug 510252

Summary: AttributeError: 'F12_Bootloader' object has no attribute 'forceLBA'
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: pykickstartAssignee: Chris Lumens <clumens>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: clumens, jturner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-09 15:39:43 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
patch + unittest
patch + unittest (UPDATED) none

Description James Laska 2009-07-08 09:49:40 EDT
= Description =

 * SNAKE server template generation is failing, I think, due to a bug in pykickstart.  The --lba32 option is deprecated in Fedora 12, however the add_option() function call does not specify dest="forceLBA".  This causes template generation to fail later since self.forceLBA is not defined.

The attached patch fixes the problem and adds a unit test for F12 bootloader checking.

= Version tested =
 * pykickstart-1.55-1

Jul 08 05:45:20 root: ERROR: Exception occured while processing XMLRPC request kickstart.generate
Traceback (most recent call last):
  File "/usr/sbin/snake-server", line 117, in _dispatch
    return DocXMLRPCServer._dispatch(self, method, params)
  File "/usr/lib64/python2.5/SimpleXMLRPCServer.py", line 415, in _dispatch
    return func(*params)
  File "/usr/lib/python2.5/site-packages/snake/ksdb.py", line 179, in generate
    k.parse(reset=False, ksmeta=kwargs.get("ksmeta",{}))
  File "/usr/lib/python2.5/site-packages/snake/kickstart.py", line 239, in parse
    ksdata = str(self.ksdata.ks(**ksmeta))
  File "/var/lib/snake/templates/installdefaults.py", line 63, in __str__
    return Defaults.__str__(self)
  File "/var/lib/snake/templates/defaults.py", line 58, in __str__
    return SnakeHandler.__str__(self)
  File "/usr/lib/python2.5/site-packages/pykickstart/base.py", line 268, in __str__
    retval += obj.__str__()
  File "/usr/lib/python2.5/site-packages/pykickstart/commands/bootloader.py", line 74, in __str__
    retval += self._getArgsAsStr() + "\n"
  File "/usr/lib/python2.5/site-packages/pykickstart/commands/bootloader.py", line 160, in _getArgsAsStr
    ret = FC4_Bootloader._getArgsAsStr(self)
  File "/usr/lib/python2.5/site-packages/pykickstart/commands/bootloader.py", line 125, in _getArgsAsStr
    if self.forceLBA:
AttributeError: 'F12_Bootloader' object has no attribute 'forceLBA'
Comment 1 James Laska 2009-07-08 09:50:35 EDT
Created attachment 350937 [details]
patch + unittest
Comment 2 James Laska 2009-07-08 09:56:45 EDT
Created attachment 350938 [details]
patch + unittest (UPDATED)

Updated unitest.  As previously written it was not executing parent class tests.  When properly calling the parent class unit tests, it was able to find this failure.

The updated patch corrects the unittest, and also adjusts the deprecation of --lba32.
Comment 3 Chris Lumens 2009-07-09 15:39:43 EDT
Thanks for the patch.  This will be included in the next build of pykickstart.