Bug 864180 - AttributeError: 'NoneType' object has no attribute 'isExtended'
Summary: AttributeError: 'NoneType' object has no attribute 'isExtended'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 18
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:89f91e64f748125e9778fe1e141...
: 865737 (view as bug list)
Depends On:
Blocks: F18Beta, F18BetaBlocker F18Betappc
TreeView+ depends on / blocked
 
Reported: 2012-10-08 19:27 UTC by Mark Hamzy
Modified: 2012-10-23 13:08 UTC (History)
11 users (show)

Fixed In Version: anaconda-18.15-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-23 13:08:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (283.77 KB, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: product (6 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: type (9 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: environ (816 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: storage.log (139.13 KB, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: version (2 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: program.log (60.63 KB, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: anaconda.log (3.32 KB, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: syslog (40.93 KB, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: hashmarkername (8 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: packaging.log (3.55 KB, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: cmdline_file (184 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: release (24 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
File: description (773 bytes, text/plain)
2012-10-08 19:27 UTC, Mark Hamzy
no flags Details
current traceback (270.47 KB, text/plain)
2012-10-09 21:10 UTC, Mark Hamzy
no flags Details

Description Mark Hamzy 2012-10-08 19:27:11 UTC
Version-Release number of selected component:
anaconda-18.13

Additional info:
libreport version: 2.0.12
cmdline:        /usr/bin/python  /sbin/anaconda
kernel:         3.6.0-2.fc18.ppc64

Comment 1 Mark Hamzy 2012-10-08 19:27:13 UTC
Created attachment 623670 [details]
File: anaconda-tb

Comment 2 Mark Hamzy 2012-10-08 19:27:16 UTC
Created attachment 623671 [details]
File: product

Comment 3 Mark Hamzy 2012-10-08 19:27:18 UTC
Created attachment 623672 [details]
File: type

Comment 4 Mark Hamzy 2012-10-08 19:27:19 UTC
Created attachment 623673 [details]
File: environ

Comment 5 Mark Hamzy 2012-10-08 19:27:21 UTC
Created attachment 623674 [details]
File: storage.log

Comment 6 Mark Hamzy 2012-10-08 19:27:23 UTC
Created attachment 623675 [details]
File: version

Comment 7 Mark Hamzy 2012-10-08 19:27:24 UTC
Created attachment 623676 [details]
File: program.log

Comment 8 Mark Hamzy 2012-10-08 19:27:27 UTC
Created attachment 623677 [details]
File: anaconda.log

Comment 9 Mark Hamzy 2012-10-08 19:27:28 UTC
Created attachment 623678 [details]
File: syslog

Comment 10 Mark Hamzy 2012-10-08 19:27:30 UTC
Created attachment 623679 [details]
File: hashmarkername

Comment 11 Mark Hamzy 2012-10-08 19:27:31 UTC
Created attachment 623680 [details]
File: packaging.log

Comment 12 Mark Hamzy 2012-10-08 19:27:33 UTC
Created attachment 623681 [details]
File: cmdline_file

Comment 13 Mark Hamzy 2012-10-08 19:27:34 UTC
Created attachment 623682 [details]
File: release

Comment 14 Mark Hamzy 2012-10-08 19:27:36 UTC
Created attachment 623683 [details]
File: description

Comment 15 Mark Hamzy 2012-10-08 20:50:57 UTC
1) Select "Software Selection," choose "Minimal install," select Done.
2) Select "Installation Destination," deselect disk, select Done.
3) Select "Installation Destination," select disk, select Done.
4) Select "Installation Destination," select Continue.
5) Select "Reclaim Space," select "/ (Fedora Linux 18 for ppc64)," change action to Delete, select "Reclaim Space."
6) Select "Reclaim Space," anaconda traps


The anaconda updates.img file contains the following because I am unable to change the execution line number back to the dev = getDevicesByPath() line

[root@bluebill anaconda-18.13-1]# git diff
diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py
index fcccbeb..14b8982 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -120,6 +120,11 @@ class ResizeDialog(GUIObject):
             for part in disk.format.partitions:
                 dev = self.storage.devicetree.getDeviceByPath(part.path)
 
+                if dev is None:
+                    import pdb
+                    pdb.set_trace()
+                    self.storage.devicetree.getDeviceByPath(part.path)
+
                 if dev.isExtended and disk.format.logicalPartitions:
                     continue
 

> /tmp/updates/pyanaconda/storage/devicetree.py(2062)getDeviceByPath()
-> if not path:
(Pdb) print path
/dev/sda5
(Pdb) print preferLeaves
True
(Pdb) path in [d.path for d in self._devices]
False
(Pdb) [d.path for d in self._devices]
['/dev/sda', '/dev/sda1', '/dev/sda2', '/dev/sda3', '/dev/sda4', '/dev/sr0', '/run/install/repo/LiveOS/squashfs.img', '/dev/loop0', '/LiveOS/rootfs.img', '/dev/loop1', '/overlay (deleted)', '/dev/loop2', '/dev/mapper/live-rw']

So it seems that the extended partition is no longer in _devices.

[anaconda root@sharpie /]# fdisk -l /dev/sda

Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x90570900

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048       10239        4096   41  PPC PReP Boot
/dev/sda2           10240     1034239      512000   83  Linux
/dev/sda3         1034240     9324543     4145152   82  Linux swap / Solaris
/dev/sda4         9324544    62914559    26795008    5  Extended
/dev/sda5         9326592    62914559    26793984   83  Linux

Comment 16 Chris Lumens 2012-10-09 14:24:21 UTC
Different traceback, but same underlying cause.

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

Comment 17 Chris Lumens 2012-10-09 17:53:02 UTC
Different traceback, different fix.

Comment 18 Mark Hamzy 2012-10-09 19:43:02 UTC
With a multipath disk only and anaconda-18.14-1.fc18, I immediately hit this exception.

Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 123, in populate
    if dev.isExtended and disk.format.logicalPartitions:
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 167, in refresh
    self.populate(disks)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/storage.py", line 665, in on_continue_clicked
    resizeDialog.refresh(disks)
AttributeError: 'NoneType' object has no attribute 'isExtended'

> /usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py(123)populate()
-> if dev.isExtended and disk.format.logicalPartitions:
(Pdb) print part.path
/dev/mapper/mpatha1
(Pdb) [d.path for d in self.storage.devicetree._devices]
['/dev/sr0', '/dev/sda', '/dev/sdb', '/dev/sdc', '/dev/sdd', '/run/install/repo/LiveOS/squashfs.img', '/dev/loop0', '/LiveOS/rootfs.img', '/dev/loop1', '/overlay (deleted)', '/dev/loop2', '/dev/mapper/mpatha', '/dev/mapper/live-rw']
(Pdb) [part.path for part in disk.format.partitions]
['/dev/mapper/mpatha1', '/dev/mapper/mpatha2', '/dev/mapper/mpatha3', '/dev/mapper/mpatha4', '/dev/mapper/mpatha5']

Comment 20 Chris Lumens 2012-10-09 20:51:37 UTC
Please double check that you are, in fact, using an updates image with the correct files.  And if that is the case, please attach the traceback to this bug.

Comment 21 Mark Hamzy 2012-10-09 21:09:56 UTC
I have verified that I am using an updates image with:

https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-October/001512.html
https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-October/001513.html

which reference one file and has been applied. /tmp/updates/pyanaconda/ui/gui/spokes/storage.py does have the patches applied.

Comment 22 Mark Hamzy 2012-10-09 21:10:23 UTC
Created attachment 624278 [details]
current traceback

Comment 23 Kamil Páral 2012-10-10 09:35:09 UTC
I tried to reclaim space by deleting existing partitions

Package: anaconda-18.14
Architecture: i686
OS Release: Fedora release 18-Beta-TC3

Comment 24 Kamil Páral 2012-10-10 09:37:27 UTC
Proposing as Beta blocker, I hit this with a standard harddisk, no fancy stuff.

Comment 25 Chris Lumens 2012-10-10 13:08:03 UTC
Mark - multipath is completely untested territory as far as I know, so there could very well be more multipath-specific things going on there.

Comment 26 Chris Lumens 2012-10-10 13:08:14 UTC
*** Bug 864718 has been marked as a duplicate of this bug. ***

Comment 27 Jan Sedlák 2012-10-10 13:37:46 UTC
I have tried to reclaim space by using reclaim dialog, "deleting" partitions. I returned me into "Choose local disk", so I clicked "continue" and boom goes the dynamite.

Package: anaconda-18.14
Architecture: x86_64
OS Release: Fedora release 18-Beta-TC3

Comment 28 Fedora Update System 2012-10-11 01:05:19 UTC
anaconda-18.15-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.15-1.fc18

Comment 29 Adam Williamson 2012-10-11 02:17:49 UTC
Went through 'guided partitioning'  to clear space on a system into which I'd done a default autopart F18 beta tc3 install to an empty 15GB disk. I was able to set action to 'delete' for all partitions and 'finish' the dialog, then it went back to the 'you don't have enough space but we can help you reclaim it' screen. I think I hit 'reclaim space' again on that screen, and it crashed.

Package: anaconda-18.14
OS Release: Fedora release 18-Beta-TC3

Comment 30 Fedora Update System 2012-10-11 02:58:55 UTC
Package anaconda-18.15-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.15-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15903/anaconda-18.15-1.fc18
then log in and leave karma (feedback).

Comment 31 Adam Williamson 2012-10-11 16:54:22 UTC
Discussed at 2012-10-11 blocker review meeting: http://meetbot.fedoraproject.org/fedora-qa/2012-10-11/f18beta-blocker-review-3.1.2012-10-11-16.04.log.txt . Accepted as a blocker per Alpha criterion "The installer must be able to complete an installation using automatic partitioning to any sufficiently large target disk, whether unformatted, empty, or containing any kind of existing data" - it's possible to hit this with a pretty simple attempt to just install to an existing populated disk by removing all the partitions on the populated disk (that's what I was doing in comment #29).

Comment 32 Fedora Update System 2012-10-12 01:07:07 UTC
anaconda-18.16-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.16-1.fc18

Comment 33 Pavel Holica 2012-10-12 09:41:57 UTC
*** Bug 865737 has been marked as a duplicate of this bug. ***

Comment 34 Seppo Yli-Olli 2012-10-13 09:29:07 UTC
The bug as described in bug marked as duplicate 864718 still persists in smoke9.
if getattr(dev, 'isExtended', False) and disk.format.logicalPartitions:
would probably axe the rest of the issues but I suppose the key questions is:
must a dev have isExtended attribute? BTRFSVolumeDevice seems not to. Not always, anyway

Comment 35 Adam Williamson 2012-10-15 23:00:15 UTC
Chris, does #34 sound like this fix didn't work, or rather that we should re-opne 864718?

Comment 36 Chris Lumens 2012-10-16 02:08:33 UTC
I need to see data to be able to tell.

Comment 37 Kamil Páral 2012-10-16 11:56:24 UTC
I am unable to test the fix because of bug 865009, I'll test with TC5.

Comment 38 Seppo Yli-Olli 2012-10-16 19:08:19 UTC
I've some technical difficulties providing the stack traces since report bug button crashes Anaconda. However, on painful looking, appears that in fact my stack trace doesn't mention BTRFSVolumeDevice but BTRFSSubvolumeDevice. Otherwise the stack trace is identical. The partitioning sda1 Ext4, sda2 Btrfs, sda3 swap, all primary, no extended partitions. BTRFSSubvolumeDevice will not get attribute isExtended. Reproducible always on my system. I ended up in this situation in the first place by installing with Fedora TC3 with Btrfs enabled.

Comment 39 Seppo Yli-Olli 2012-10-16 19:19:39 UTC
I just read some source code:
StorageDevice->PartitionDevice (PartitionDevice defines isExtended)
StorageDevice->BTRFSDevice->BTRFSVolumeDevice->BTRFSSubvolumeDevice (no isExtended exists because we inherit StorageDevice, not PartitionDevice)
This would explain the really botched behaviour. Source code is from anaconda 18.16. Could someone confirm? Other devices should be checked for incorrect inheritance as well.

Comment 40 Fedora Update System 2012-10-17 03:10:13 UTC
anaconda-18.17-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.17-1.fc18

Comment 41 Fedora Update System 2012-10-18 02:38:58 UTC
anaconda-18.18-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.18-1.fc18

Comment 42 Seppo Yli-Olli 2012-10-18 19:47:37 UTC
Confirming these problems no longer occur for me in smoke11.

Comment 43 Adam Williamson 2012-10-18 21:36:11 UTC
setting VERIFIED then, thanks.

Comment 44 Fedora Update System 2012-10-20 01:34:48 UTC
anaconda-18.19-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.19-1.fc18

Comment 45 Fedora Update System 2012-10-20 03:52:45 UTC
Package anaconda-18.19-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing anaconda-18.19-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16528/anaconda-18.19-1.fc18
then log in and leave karma (feedback).

Comment 46 Kamil Páral 2012-10-23 13:08:41 UTC
I haven't seen this with TC6. Seppo confirmed fix as well, closing this bug. If someone else still hits this, please reopen.


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