This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 864180 - AttributeError: 'NoneType' object has no attribute 'isExtended'
AttributeError: 'NoneType' object has no attribute 'isExtended'
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
18
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Chris Lumens
Fedora Extras Quality Assurance
abrt_hash:89f91e64f748125e9778fe1e141...
: Reopened
: 865737 (view as bug list)
Depends On:
Blocks: F18Beta/F18BetaBlocker F18Betappc
  Show dependency treegraph
 
Reported: 2012-10-08 15:27 EDT by Mark Hamzy
Modified: 2012-10-23 09:08 EDT (History)
11 users (show)

See Also:
Fixed In Version: anaconda-18.15-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-23 09:08:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Mark Hamzy 2012-10-08 15:27:11 EDT
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 15:27:13 EDT
Created attachment 623670 [details]
File: anaconda-tb
Comment 2 Mark Hamzy 2012-10-08 15:27:16 EDT
Created attachment 623671 [details]
File: product
Comment 3 Mark Hamzy 2012-10-08 15:27:18 EDT
Created attachment 623672 [details]
File: type
Comment 4 Mark Hamzy 2012-10-08 15:27:19 EDT
Created attachment 623673 [details]
File: environ
Comment 5 Mark Hamzy 2012-10-08 15:27:21 EDT
Created attachment 623674 [details]
File: storage.log
Comment 6 Mark Hamzy 2012-10-08 15:27:23 EDT
Created attachment 623675 [details]
File: version
Comment 7 Mark Hamzy 2012-10-08 15:27:24 EDT
Created attachment 623676 [details]
File: program.log
Comment 8 Mark Hamzy 2012-10-08 15:27:27 EDT
Created attachment 623677 [details]
File: anaconda.log
Comment 9 Mark Hamzy 2012-10-08 15:27:28 EDT
Created attachment 623678 [details]
File: syslog
Comment 10 Mark Hamzy 2012-10-08 15:27:30 EDT
Created attachment 623679 [details]
File: hashmarkername
Comment 11 Mark Hamzy 2012-10-08 15:27:31 EDT
Created attachment 623680 [details]
File: packaging.log
Comment 12 Mark Hamzy 2012-10-08 15:27:33 EDT
Created attachment 623681 [details]
File: cmdline_file
Comment 13 Mark Hamzy 2012-10-08 15:27:34 EDT
Created attachment 623682 [details]
File: release
Comment 14 Mark Hamzy 2012-10-08 15:27:36 EDT
Created attachment 623683 [details]
File: description
Comment 15 Mark Hamzy 2012-10-08 16:50:57 EDT
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 10:24:21 EDT
Different traceback, but same underlying cause.

*** This bug has been marked as a duplicate of bug 862972 ***
Comment 17 Chris Lumens 2012-10-09 13:53:02 EDT
Different traceback, different fix.
Comment 18 Mark Hamzy 2012-10-09 15:43:02 EDT
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 16:51:37 EDT
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 17:09:56 EDT
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 17:10:23 EDT
Created attachment 624278 [details]
current traceback
Comment 23 Kamil Páral 2012-10-10 05:35:09 EDT
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 05:37:27 EDT
Proposing as Beta blocker, I hit this with a standard harddisk, no fancy stuff.
Comment 25 Chris Lumens 2012-10-10 09:08:03 EDT
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 09:08:14 EDT
*** Bug 864718 has been marked as a duplicate of this bug. ***
Comment 27 Jan Sedlák 2012-10-10 09:37:46 EDT
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-10 21:05:19 EDT
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-10 22:17:49 EDT
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-10 22:58:55 EDT
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 12:54:22 EDT
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-11 21:07:07 EDT
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 05:41:57 EDT
*** Bug 865737 has been marked as a duplicate of this bug. ***
Comment 34 Seppo Yli-Olli 2012-10-13 05:29:07 EDT
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 19:00:15 EDT
Chris, does #34 sound like this fix didn't work, or rather that we should re-opne 864718?
Comment 36 Chris Lumens 2012-10-15 22:08:33 EDT
I need to see data to be able to tell.
Comment 37 Kamil Páral 2012-10-16 07:56:24 EDT
I am unable to test the fix because of bug 865009, I'll test with TC5.
Comment 38 Seppo Yli-Olli 2012-10-16 15:08:19 EDT
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 15:19:39 EDT
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-16 23:10:13 EDT
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-17 22:38:58 EDT
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 15:47:37 EDT
Confirming these problems no longer occur for me in smoke11.
Comment 43 Adam Williamson 2012-10-18 17:36:11 EDT
setting VERIFIED then, thanks.
Comment 44 Fedora Update System 2012-10-19 21:34:48 EDT
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-19 23:52:45 EDT
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 09:08:41 EDT
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.