Bug 510252 - AttributeError: 'F12_Bootloader' object has no attribute 'forceLBA'
Summary: AttributeError: 'F12_Bootloader' object has no attribute 'forceLBA'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pykickstart
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-08 13:49 UTC by James Laska
Modified: 2013-09-02 06:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-07-09 19:39:43 UTC
Type: ---
Embargoed:


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

Description James Laska 2009-07-08 13:49:40 UTC
= 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 13:50:35 UTC
Created attachment 350937 [details]
patch + unittest

Comment 2 James Laska 2009-07-08 13:56:45 UTC
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 19:39:43 UTC
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.