Bug 491367

Summary: IBM Power5: AttributeError: 'NoneType' object has no attribute 'getFlag'
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: anacondaAssignee: David Cantrell <dcantrell>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: anaconda-maint-list, awilliam, jgranado, jturner, pjones, rmaximo, vanmeeuwen+fedora, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: ppc   
OS: Linux   
Whiteboard: anaconda_trace_hash:b68e9a3cedf7a4ad67da95f57e492b2821fc4a38c670b93f2a6dbd3123adbc79
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-24 15:19:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 476774    
Attachments:
Description Flags
Attached traceback automatically from anaconda. none

Description James Laska 2009-03-20 16:42:08 UTC
The following was filed automatically by anaconda:
anaconda 11.5.0.34 exception report
Traceback (most recent call first):
  File "/tmp/updates/platform.py", line 239, in bootDevice
    if device.partedPartition.getFlag(parted.PARTITION_PREP):
  File "/usr/lib/anaconda/storage/partitioning.py", line 548, in doPartitioning
    bootDev = anaconda.platform.bootDevice()
  File "/usr/lib/anaconda/storage/partitioning.py", line 191, in doAutoPartition
    exclusiveDisks=anaconda.id.storage.clearPartDisks)
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 128, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1317, in nextClicked
    self.anaconda.dispatch.gotoNext()
AttributeError: 'NoneType' object has no attribute 'getFlag'

Comment 1 James Laska 2009-03-20 16:42:13 UTC
Created attachment 336077 [details]
Attached traceback automatically from anaconda.

Comment 2 James Laska 2009-03-20 16:44:19 UTC
Steps to reproduce:
 1) ppc64 (IBM Power5) system
 2) Boot with http://jlaska.fedorapeople.org/updates.img (contains fixes for bug#491335 and bug#490515)
 3) partition with "Use entire drive" and autopart

Comment 3 James Laska 2009-03-23 14:22:40 UTC
Reproducing without updates image as of 2009-03-23 rawhide (anaconda 11.5.0.35)

Comment 4 James Laska 2009-03-23 14:26:21 UTC
Updated traceback ... 
The following was filed automatically by anaconda:
anaconda 11.5.0.35 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/platform.py", line 239, in bootDevice
    if device.partedPartition.getFlag(parted.PARTITION_PREP):
  File "/usr/lib/anaconda/storage/partitioning.py", line 548, in doPartitioning
    bootDev = anaconda.platform.bootDevice()
  File "/usr/lib/anaconda/storage/partitioning.py", line 191, in
doAutoPartition
    exclusiveDisks=anaconda.id.storage.clearPartDisks)
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 128, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1317, in nextClicked
    self.anaconda.dispatch.gotoNext()
AttributeError: 'NoneType' object has no attribute 'getFlag'

Comment 5 James Laska 2009-03-23 14:26:29 UTC
*** Bug 491656 has been marked as a duplicate of this bug. ***

Comment 6 David Cantrell 2009-03-24 02:25:46 UTC
James,

I suspect this might be failing to initialize partedPartition because of the following code in class PartitionDevice:

    def _getPartedPartition(self):
        if self.disk and not self._partedPartition:
            pdisk = self.disk.partedDisk
            self._partedPartition = pdisk.getPartitionByPath(self.path)

        return self._partedPartition

The call to getPartitionByPath() will only succeed if the prep partition has a device node.  I don't know if it does on ppc systems.  Can you verify if the prep boot partition has a device node or not on ppc systems?

Comment 7 James Laska 2009-03-24 13:25:13 UTC
In the install environment ..

sh-4.0# parted /dev/sda -s p
Model: IBM H0 ST336753LC (scsi)
Disk /dev/sda: 36.4GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags     
 1      32.3kB  8225kB  8193kB  primary               boot, prep
 2      8225kB  214MB   206MB   primary  ext3                   
 3      214MB   36.4GB  36.2GB  primary               lvm       

sh-4.0# ls -l /dev/sda*
brw-rw----. 1 root disk 8, 0 2009-03-24 13:17 /dev/sda
brw-rw----. 1 root disk 8, 1 2009-03-24 13:17 /dev/sda1
brw-rw----. 1 root disk 8, 2 2009-03-24 13:17 /dev/sda2
brw-rw----. 1 root disk 8, 3 2009-03-24 13:17 /dev/sda3

Is this the information you needed?

Comment 8 Joel Andres Granados 2009-03-24 14:02:11 UTC
The getFalg call is no longer in platform.py.  Does this issue still reproduce?

Comment 9 James Laska 2009-03-24 14:39:07 UTC
I'm not seeing this, but I am seeing bug#491865 using the same test on the same system.

Comment 10 Adam Williamson 2009-04-22 17:00:04 UTC
491865 is resolved now, can this also be resolved?

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 11 Will Woods 2009-04-24 15:00:19 UTC
Needs retesting on a IBM Power system. James?

Comment 12 James Laska 2009-04-24 15:19:25 UTC
Tested this yesterday, I am no longer seeing this particular issue on IBM Power5 ppc64 systems.