Bug 527952 - AttributeError: 'NoneType' object has no attribute 'disk'
Summary: AttributeError: 'NoneType' object has no attribute 'disk'
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: anaconda_trace_hash:49bcea4108019147e...
: 529219 (view as bug list)
Depends On:
Blocks: 528772 F12AnacondaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-10-08 11:17 UTC by Jan Stodola
Modified: 2009-10-29 09:06 UTC (History)
5 users (show)

Fixed In Version: anaconda-12.39-1
Clone Of:
Environment:
Last Closed: 2009-10-29 09:06:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Attached traceback automatically from anaconda. (638.34 KB, text/plain)
2009-10-08 11:18 UTC, Jan Stodola
no flags Details
screenshot from installation (114.96 KB, image/png)
2009-10-08 11:45 UTC, Jan Stodola
no flags Details

Description Jan Stodola 2009-10-08 11:17:54 UTC
The following was filed automatically by anaconda:
anaconda 12.33 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devices.py", line 987, in _getPartedPartition
    partitionDisk = self._partedPartition.disk.getPedDisk()
  File "/usr/lib/anaconda/storage/devices.py", line 1012, in <lambda>
    partedPartition = property(lambda d: d._getPartedPartition(),
  File "/usr/lib/anaconda/storage/devices.py", line 1098, in setFlag
    part=self.partedPartition)
  File "/usr/lib/anaconda/storage/deviceaction.py", line 267, in execute
    self.device.setFlag(self.format.partedFlag)
  File "/usr/lib/anaconda/storage/devicetree.py", line 707, in processActions
    action.execute(intf=self.intf)
  File "/usr/lib/anaconda/storage/__init__.py", line 269, in doIt
    self.devicetree.processActions()
  File "/usr/lib/anaconda/packages.py", line 110, in turnOnFilesystems
    anaconda.id.storage.doIt()
  File "/usr/lib/anaconda/dispatch.py", line 200, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 123, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/gui.py", line 1195, in nextClicked
    self.anaconda.dispatch.gotoNext()
AttributeError: 'NoneType' object has no attribute 'disk'

Comment 1 Jan Stodola 2009-10-08 11:18:01 UTC
Created attachment 364085 [details]
Attached traceback automatically from anaconda.

Comment 2 Jan Stodola 2009-10-08 11:45:26 UTC
Created attachment 364091 [details]
screenshot from installation

Steps to reproduce:
* Create 2 disk images:
dd if=/dev/zero of=images/2GB_a.img bs=1M count=2000
dd if=/dev/zero of=images/2GB_b.img bs=1M count=2000

* Start installation using boot.iso from rawhide-20091007, x86_64 in kvm:
qemu-kvm -cdrom boot.iso -hda images/2GB_a.img -hdb images/2GB_b.img -m 512

* re-initialize both disks when asked
* select "Create custom layout"
* create new /boot partition (ext4, 200MB)
* create 8x 400MB sw RAID partition
* create RAID device (mnt point: /, ext4, md0, RAID1, Members: sda2, sda5, sdb1, sdb3)
* create RAID device (mnt point: /usr, ext4, md0, RAID1, Members: sda3, sda6, sdb2, sdb5)
* create new swap partition (200 MB)
you will see error: Could not allocate requested partitions: not enough free space on disks.
* click OK, click Cancel and now is /boot partition on sdb6 and sda1 is free (see screenshot)
* create new swap partition (100MB)
* click Next and confirm writing changes to disks
* traceback

Comment 3 Hans de Goede 2009-10-08 13:18:27 UTC
Hmm,

This one is funky, we say we are going to create sda2, 
then looking at call trace in anaconda.log we do and we get to
the part of PartitionDevice.create where we zero out the beginning and
ending of the partition, this is after writing the new partition to the table and committing the table to disk and os, yet /dev/sda2 does not exist, see:

[2009-10-08 07:16:43,535]    DEBUG: zeroing out beginning and end of /dev/sda2...
[2009-10-08 07:16:43,536]    ERROR: error zeroing out /dev/sda2: [Errno 2] No such file or directory: '/dev/sda2'

Note in the syslog that the kernel did rescan the part table but did not find
sda2, and the self.disk.format.partedDisk.getPartitionByPath(self.path)
call in PartitionDevice.create() after the zeroing returns None, so something
rather weird is going here.

dlehman, since this is regular disk partitioning (and I don't have a clue) i'm assigning this one to you.

Comment 4 David Lehman 2009-10-09 15:50:51 UTC
If this system is still in the failure state, or if it is reproducible, I would like to see the output of the following commands:

  parted /dev/sda print
  parted /dev/sdb print
  cat /proc/partitions
  blkid

Thanks.

Comment 5 Jan Stodola 2009-10-13 09:24:19 UTC
There are outputs when traceback appeared, using steps in comment 2 and rawhide-20091012, anaconda 12.36:

parted /dev/sda print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sda: 2097MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size   Type     File system  Flags
 1      210MB  629MB  419MB  primary

parted /dev/sdb print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sdb: 2097MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

cat /proc/partitions
major minor  #blocks  name

   7        0     116312 loop0
   8        0    2048000 sda
   8        1     409600 sda1
   8       16    2048000 sdb

blkid
/dev/loop0: TYPE="squashfs"

Comment 7 Jan Stodola 2009-10-15 14:59:47 UTC
*** Bug 529219 has been marked as a duplicate of this bug. ***

Comment 8 David Lehman 2009-10-20 23:11:55 UTC
Should be fixed in anaconda-12.39-1.

Comment 9 Adam Williamson 2009-10-21 16:32:37 UTC
Jan, can you please test that anaconda release and confirm the fix? Thanks.

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

Comment 10 Jan Stodola 2009-10-22 08:40:31 UTC
Adam, I will retest this bug as soon as the new anaconda-12.39-1 is included in new rawhide build.

Comment 11 Adam Williamson 2009-10-28 21:00:38 UTC
12.39 was tagged on 20091024. Please test with a net install of Rawhide from a mirror up to that date or later, or a nightly live build from that date or later - http://alt.fedoraproject.org/pub/alt/nightly-composes/desktop/ . Thanks!

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

Comment 12 Jan Stodola 2009-10-29 09:06:16 UTC
Verified with rawhide-20091028, anaconda-12.39-1, x86_64 arch in kvm.


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