Bug 510252 - AttributeError: 'F12_Bootloader' object has no attribute 'forceLBA'
AttributeError: 'F12_Bootloader' object has no attribute 'forceLBA'
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pykickstart (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-08 09:49 EDT by James Laska
Modified: 2013-09-02 02:37 EDT (History)
2 users (show)

See Also:
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: ---


Attachments (Terms of Use)
patch + unittest (1.18 KB, patch)
2009-07-08 09:50 EDT, James Laska
no flags Details | Diff
patch + unittest (UPDATED) (1.51 KB, patch)
2009-07-08 09:56 EDT, James Laska
no flags Details | Diff

  None (edit)
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.

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