Bug 707777 - Kickstart throws exception when using --onpart 'NoneType' object has no attribute 'rfind'
Summary: Kickstart throws exception when using --onpart 'NoneType' object has no attri...
Keywords:
Status: CLOSED DUPLICATE of bug 706542
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 15
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-25 21:59 UTC by Jeff Bearer
Modified: 2011-05-25 23:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 23:27:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeff Bearer 2011-05-25 21:59:12 UTC
Description of problem:

I have a kickstart where in the %pre I use parted to partition the disk and create the part commands in an include file for kickstart.  when the kickstart gets to enablefilesystems it throws an exception.

If I run the same kickstart in Fedora 14 it works.

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

Fedora 15

How reproducible:

Always

Steps to Reproduce:
1. Run some parted commands in the pre
2. create the part for the kickstart in /tmp
3. include the created file into the kickstart
  
Actual results:

From anaconda.log

17:44:07,024 DEBUG anaconda: enablefilesystems is a direct step
17:44:07,112 INFO anaconda: Running kickstart %%traceback script(s)
17:44:07,113 INFO anaconda: All kickstart %%traceback script(s) have been run
17:44:07,118 CRIT anaconda: anaconda 15.31 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/__init__.py", line 422, in majorminor
    device = dm_node_from_name(os.path.basename(self.device))
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/__init__.py", line 271, in cacheMajorminor
    self.majorminor # this does the caching
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 700, in _preTeardown
    self.format.cacheMajorminor()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 714, in teardown
    if not self._preTeardown(recursive=recursive):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1868, in teardownAll
    device.teardown(recursive=True)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/packages.py", line 103, in turnOnFilesystems
    anaconda.storage.devicetree.teardownAll()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 211, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 130, in gotoNext
    self.moveStep()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 234, in currentStep
    self.gotoNext()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/text.py", line 529, in run
    (step, instance) = anaconda.dispatch.currentStep()
  File "/usr/sbin/anaconda", line 925, in <module>
    anaconda.intf.run(anaconda)
AttributeError: 'NoneType' object has no attribute 'rfind'


Expected results:

Anaconda to format the partitions specified.

Additional info:

Relevant components from the kickstart.

%include /tmp/pre_install_disk_config
%pre
# Logic to find partition sizes goes before this part
parted -s /dev/$drive unit s mkpart primary ext3 $ROOT_START $ROOT_STOP
parted -s /dev/$drive unit s mkpart extended $EX_START 100%
parted -s /dev/$drive unit s mkpart logical ext3 $T_START $T_STOP
parted -s /dev/$drive unit s mkpart logical $SWAP_START $SWAP_STOP

cat <<EOM > /tmp/pre_install_disk_config
part / --onpart=sda1 --fstype=ext4
part /t --onpart=sda5 --fstype=ext4
part swap --onpart=sda6 --fstype=swap

EOM

Comment 1 Chris Lumens 2011-05-25 23:27:30 UTC

*** This bug has been marked as a duplicate of bug 706542 ***


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