Bug 527952 - AttributeError: 'NoneType' object has no attribute 'disk'
AttributeError: 'NoneType' object has no attribute 'disk'
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lehman
Fedora Extras Quality Assurance
anaconda_trace_hash:49bcea4108019147e...
:
: 529219 (view as bug list)
Depends On:
Blocks: 528772 F12AnacondaBlocker
  Show dependency treegraph
 
Reported: 2009-10-08 07:17 EDT by Jan Stodola
Modified: 2009-10-29 05:06 EDT (History)
5 users (show)

See Also:
Fixed In Version: anaconda-12.39-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-29 05:06:16 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)
Attached traceback automatically from anaconda. (638.34 KB, text/plain)
2009-10-08 07:18 EDT, Jan Stodola
no flags Details
screenshot from installation (114.96 KB, image/png)
2009-10-08 07:45 EDT, Jan Stodola
no flags Details

  None (edit)
Description Jan Stodola 2009-10-08 07:17:54 EDT
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 07:18:01 EDT
Created attachment 364085 [details]
Attached traceback automatically from anaconda.
Comment 2 Jan Stodola 2009-10-08 07:45:26 EDT
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 09:18:27 EDT
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 11:50:51 EDT
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 05:24:19 EDT
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 10:59:47 EDT
*** Bug 529219 has been marked as a duplicate of this bug. ***
Comment 8 David Lehman 2009-10-20 19:11:55 EDT
Should be fixed in anaconda-12.39-1.
Comment 9 Adam Williamson 2009-10-21 12:32:37 EDT
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 04:40:31 EDT
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 17:00:38 EDT
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 05:06:16 EDT
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.