Bug 872833 - ValueError: Cannot remove non-leaf device 'fedora'
ValueError: Cannot remove non-leaf device 'fedora'
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Lehman
Fedora Extras Quality Assurance
abrt_hash:9c43f6ccdf3dc7419c6c2fb785e...
:
Depends On:
Blocks: F18Beta/F18BetaBlocker
  Show dependency treegraph
 
Reported: 2012-11-03 13:34 EDT by Steve Tyler
Modified: 2012-11-23 02:49 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-23 02:49:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: anaconda-tb (843.56 KB, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: environ (885 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: type (9 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: ifcfg.log (641 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: storage.log (471.80 KB, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: version (2 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: program.log (170.46 KB, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: executable (14 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: product (6 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: anaconda.log (20.11 KB, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: hashmarkername (8 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: cmdline_file (162 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: release (33 bytes, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
File: messages (151.03 KB, text/plain)
2012-11-03 13:34 EDT, Steve Tyler
no flags Details
[18.27 log anaconda-tb-rzlVWX] ValueError: Cannot remove non-leaf device 'fedora' (683.20 KB, text/plain)
2012-11-08 02:25 EST, Steve Tyler
no flags Details

  None (edit)
Description Steve Tyler 2012-11-03 13:34:14 EDT
Description of problem:
Create 5GB disc image.
Create 500MB '/boot'
Attempt to create '/' from the remaining space.


Version-Release number of selected component:
anaconda-18.24-1.fc18.x86_64

Additional info:
libreport version: 2.0.17
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-osimg-min --lang en_US.UTF-8
kernel:         3.6.5-2.fc18.x86_64

description:
:The following was filed automatically by anaconda:
:anaconda 18.24 exception report
:Traceback (most recent call first):
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 374, in _removeDevice
:    raise ValueError("Cannot remove non-leaf device '%s'" % dev.name)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 424, in registerAction
:    self._removeDevice(action.device)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 1164, in destroyDevice
:    self.devicetree.registerAction(action)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 2155, in newDevice
:    self.destroyDevice(container)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/custom.py", line 1734, in on_add_clicked
:    disks=disks)
:ValueError: Cannot remove non-leaf device 'fedora'
Comment 1 Steve Tyler 2012-11-03 13:34:19 EDT
Created attachment 637547 [details]
File: anaconda-tb
Comment 2 Steve Tyler 2012-11-03 13:34:21 EDT
Created attachment 637548 [details]
File: environ
Comment 3 Steve Tyler 2012-11-03 13:34:23 EDT
Created attachment 637549 [details]
File: type
Comment 4 Steve Tyler 2012-11-03 13:34:24 EDT
Created attachment 637550 [details]
File: ifcfg.log
Comment 5 Steve Tyler 2012-11-03 13:34:27 EDT
Created attachment 637551 [details]
File: storage.log
Comment 6 Steve Tyler 2012-11-03 13:34:28 EDT
Created attachment 637552 [details]
File: version
Comment 7 Steve Tyler 2012-11-03 13:34:30 EDT
Created attachment 637553 [details]
File: program.log
Comment 8 Steve Tyler 2012-11-03 13:34:31 EDT
Created attachment 637554 [details]
File: executable
Comment 9 Steve Tyler 2012-11-03 13:34:33 EDT
Created attachment 637555 [details]
File: product
Comment 10 Steve Tyler 2012-11-03 13:34:35 EDT
Created attachment 637556 [details]
File: anaconda.log
Comment 11 Steve Tyler 2012-11-03 13:34:37 EDT
Created attachment 637557 [details]
File: hashmarkername
Comment 12 Steve Tyler 2012-11-03 13:34:38 EDT
Created attachment 637558 [details]
File: cmdline_file
Comment 13 Steve Tyler 2012-11-03 13:34:40 EDT
Created attachment 637559 [details]
File: release
Comment 14 Steve Tyler 2012-11-03 13:34:41 EDT
Created attachment 637560 [details]
File: messages
Comment 15 Steve Tyler 2012-11-08 00:12:31 EST
Attempting to reproduce Bug 868505.

Package: anaconda-18.27-1.fc18.x86_64
OS Release: Fedora release 18
Comment 16 Steve Tyler 2012-11-08 02:25:47 EST
Created attachment 640605 [details]
[18.27 log anaconda-tb-rzlVWX] ValueError: Cannot remove non-leaf device 'fedora'

Reproduced with 18.27:

anaconda 18.27 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 374, in _removeDevice
    raise ValueError("Cannot remove non-leaf device '%s'" % dev.name)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 424, in registerAction
    self._removeDevice(action.device)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 1164, in destroyDevice
    self.devicetree.registerAction(action)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/__init__.py", line 2174, in newDevice
    self.destroyDevice(container)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/custom.py", line 1749, in on_add_clicked
    disks=disks)
ValueError: Cannot remove non-leaf device 'fedora'

Local variables in innermost frame:
force: None
self: <pyanaconda.storage.devicetree.DeviceTree object at 0x4f2aa10>
moddisk: True
dev: non-existent 7036MB lvmvg fedora (21)
Comment 17 Steve Tyler 2012-11-08 02:39:49 EST
This procedure appears to be a reproducer:

Start with a 12 GB disc image with default partitioning.

Proceed to Manual Partitioning.
Remove all pre-existing partitions.
Auto-create new partitions.
Remove Root partition.
Create Root partition with capacity 3000.
Create Home, but leave capacity empty.
The exception occurs when 'Add mount point' is clicked.

A corresponding log file is attached with Comment 16.

Tested with:
anaconda-18.27-1.fc18
Fedora-18-Beta-TC7-x86_64-Live-Desktop.iso

Command-line:
$ qemu-kvm -m 2048 -hda f18-test-2.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC7/Fedora-18-Beta-TC7-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse
Comment 18 Steve Tyler 2012-11-08 03:17:50 EST
(In reply to comment #17)
...
> Start with a 12 GB disc image with default partitioning.
...

$ qemu-img create f18-test-2.img 12G

Start installer from Live CD in a VM.
Click Installation Destination.
Click Done.
Click Begin Installation.
Allow installation to complete.
Click Reboot to exit installer.
Comment 19 Steve Tyler 2012-11-08 11:53:29 EST
(In reply to comment #17)
> This procedure appears to be a reproducer:
> 
...

Starting with an empty disc image is sufficient.

Here is a simpler reproducer:

$ qemu-img create f18-test-2.img 12G

Start installer from Live CD in a VM.
Click Installation Destination.
Proceed to Manual Partitioning.
Auto-create new partitions.
Remove Root partition.
Add Root mount point with capacity 3000.
Add Home mount point, but leave capacity empty.
The exception occurs when 'Add mount point' is clicked.
Comment 20 Paul W. Frields 2012-11-08 13:57:20 EST
I have a system I'm moving from F17 x86_64 to F18 x86_64. It's a KVM guest I'm using to test the process before I use it on my actual workstation, where I have a similar setup. Current partition setup is approximately:

* /dev/vda1 -   500MB - /boot
* /dev/vda2 - 11500MB - PV (one VG only)
  * LV - 4500MB - /
  * LV - 2000MB - swap
  * LV - 5000MB - /home

I believe this is a fairly common scenario for a previous Fedora installation. I selected the "let me do my own partitioning" option to reclaim space, because I want to keep /home intact. I followed this process:

1. Use '-' to remove /boot, use '+' to recreate for new installation. Swap was automatically reused.
2. Reassign /home to new installation by giving it the same mount point and hitting 'Apply changes'.
3. Use '-' to remove /
4. Use '+' to recreate / and entered mount point and size
5. Traceback.


Package: anaconda-18.24
OS Release: Fedora release 18-Beta-TC7
Comment 21 David Lehman 2012-11-08 17:42:03 EST
(In reply to comment #20)
> I have a system I'm moving from F17 x86_64 to F18 x86_64. It's a KVM guest
> I'm using to test the process before I use it on my actual workstation,
> where I have a similar setup. Current partition setup is approximately:
> 
> * /dev/vda1 -   500MB - /boot
> * /dev/vda2 - 11500MB - PV (one VG only)
>   * LV - 4500MB - /
>   * LV - 2000MB - swap
>   * LV - 5000MB - /home
> 
> I believe this is a fairly common scenario for a previous Fedora
> installation. I selected the "let me do my own partitioning" option to
> reclaim space, because I want to keep /home intact. I followed this process:
> 
> 1. Use '-' to remove /boot, use '+' to recreate for new installation. Swap
> was automatically reused.
> 2. Reassign /home to new installation by giving it the same mount point and
> hitting 'Apply changes'.
> 3. Use '-' to remove /
> 4. Use '+' to recreate / and entered mount point and size
> 5. Traceback.
> 

There is no support for adding new lvs to existing vgs as of now. What you probably want to do is just reformat /boot and / instead of deleting and then recreating them. I know that was your only option at alpha time, but now there's a "Reformat" checkbox under the "Customize" expander, next to the filesystem type dropdown menu.

Either way, this traceback will be gone in the beta.
Comment 22 David Lehman 2012-11-08 19:54:41 EST
I am hoping this ends up the same bug as 868505.
Comment 23 Paul W. Frields 2012-11-09 12:09:06 EST
The process in comment #21 gets me the desired results -- thanks for the pointer.
Comment 24 Paul Alesius 2012-11-10 02:59:19 EST
Created BIOS boot
Created Swap
Tried creating / that was supposed to expand across the rest of the disk, got the error.


Package: anaconda-18.27
OS Release: Fedora release 18
Comment 25 Kamil Páral 2012-11-12 12:24:44 EST
Discussed at 2012-11-12 QA meeting acting as a blocker review meeting. Accepted as a blocker per criterion "The installer's custom partitioning mode must be capable of the following ... Rejecting obviously invalid operations without crashing"
Comment 26 Fedora Update System 2012-11-12 20:23:46 EST
anaconda-18.29-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.29-1.fc18
Comment 27 Kamil Páral 2012-11-13 05:50:27 EST
I have reproduced the issue according to comment 17 with F18 Beta TC8, but everything worked well with smoke18 (anaconda 18.29). Setting to verified.
Comment 28 Sandro Mathys 2012-11-13 07:44:41 EST
Removed existing (Windows) partitions, added custom ones. Did the exact same thing a moment ago and it didn't crash - so not sure how to exactly reproduce this.

Package: anaconda-18.28-1.fc18.x86_64
OS Release: Fedora release 18
Comment 29 Fedora Update System 2012-11-13 14:06:53 EST
Package anaconda-18.29-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.29-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18105/anaconda-18.29-1.fc18
then log in and leave karma (feedback).
Comment 30 Fedora Update System 2012-11-23 02:49:04 EST
anaconda-18.29-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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