Bug 494833

Summary: Exception when deleting a partition
Product: [Fedora] Fedora Reporter: Travers Carter <tcarter>
Component: anacondaAssignee: Hans de Goede <hdegoede>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: anaconda-maint-list, bcl, brgrtmg, djmchl, dlehman, kiran.dhananjaykd, masinick, pjones, rmaximo, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: anaconda_trace_hash:f8dcc1453b25aa3e699db34ebd1540f269d6d64f5be43f4368f1558cf251f428
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-16 08:20:40 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:
Attachments:
Description Flags
Attached traceback automatically from anaconda.
none
Patch fixing this
none
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda. none

Description Travers Carter 2009-04-08 09:46:24 UTC
The following was filed automatically by anaconda:
anaconda 11.5.0.38 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/iw/partition_gui.py", line 931, in populate
    devname = "%s" % device.path
  File "/usr/lib/anaconda/iw/partition_gui.py", line 1055, in refresh
    self.populate()
  File "/usr/lib/anaconda/iw/partition_gui.py", line 999, in deleteCB
    self.refresh(justRedraw=justRedraw)
AttributeError: 'NoneType' object has no attribute 'path'

Comment 1 Travers Carter 2009-04-08 09:46:33 UTC
Created attachment 338679 [details]
Attached traceback automatically from anaconda.

Comment 2 Travers Carter 2009-04-08 09:57:21 UTC
Anaconda crashed when trying to delete the partition sda6 from the "Create custom layout" option during installation.

The system is a Dell XPS M1210 laptop with a single HDD, the partition table is:

sda1 - primary vfat 47 Mb
sda2 - primary ntfs 70370 Mb
sda3 - extended 44053 Mb
  sda5 - logical vfat 2055 Mb
  sda6 - logical ext3 101 Mb (old /boot)
  sda7 - logical swap 2047 Mb
  sda8 - logical ext3 190771 (old /)
sda4 - primary ntfs 190771 Mb

Comment 3 Hans de Goede 2009-04-08 12:54:10 UTC
Created attachment 338702 [details]
Patch fixing this

Here is a patch fixing this, I'll commit this to git as soon as a fellow anaconda teammember has reviewed it.

Here is a description of the problem / patch:

When there are multiple (pre-existing) logical partitions and a logical
partition other then the last partition gets deleted, the number
of the partitions after it changes. Causing getDeviceByName, with the
name based on the new partition number (gotten through parted) to fail.

Specifically this causes a "'NoneType' object has no attribute 'path'"
exception in populate() in partition_gui.py . This patch fixes this by
updating all partitions names in doPartitioning.

Note that for this patch to help the following pyparted bug must also
be fixed: https://fedorahosted.org/pyparted/ticket/17

Comment 4 David Lehman 2009-04-08 15:21:28 UTC
I'm wondering if bug 493361 is also a result of the same behavior.

Comment 5 Hans de Goede 2009-04-08 16:08:40 UTC
(In reply to comment #4)
> I'm wondering if bug 493361 is also a result of the same behavior.  

Could be, we will need to ask the reporter to retest when a new anaconda is
build *AND* a new pyparted.

Comment 6 Travers Carter 2009-04-12 22:39:32 UTC
Looks like it's expected from the latest comment, but I can confirm that this bug is still present in Fedora-11-Snap1-x86_64-Live-KDE.

Comment 7 Hans de Goede 2009-04-16 08:20:40 UTC
Both the updated pyparted and a fixed anaconda are in rawhide now, closing this.

Comment 8 Brian W. Masinick 2009-04-16 16:41:51 UTC
Created attachment 339868 [details]
Attached traceback automatically from anaconda.

Comment 9 Brian C. Lane 2009-04-17 17:21:53 UTC
Created attachment 340049 [details]
Attached traceback automatically from anaconda.

Comment 10 kiran 2009-04-18 07:05:18 UTC
Created attachment 340130 [details]
Attached traceback automatically from anaconda.

Comment 11 ENDOH takanao 2009-04-18 09:10:01 UTC
Created attachment 340139 [details]
Attached traceback automatically from anaconda.

Comment 12 Chris Lumens 2009-05-14 15:29:36 UTC
*** Bug 500862 has been marked as a duplicate of this bug. ***