Bug 1104558

Summary: DeviceError: Cannot rename existing device.
Product: [Fedora] Fedora Reporter: Petr Schindler <pschindl>
Component: python-blivetAssignee: David Shea <dshea>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: amulhern, anaconda-maint-list, awilliam, bcl, dlehman, g.kaviyarasu, jonathan, nonamedotc, sandro, vanmeeuwen+fedora, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:43f6e8637bd3e43ee873cd996ae4fd386ceb09eaa0952dbdf4ff2e32b1a12fe7
Fixed In Version: python-blivet-0.56-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-17 14:00:26 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
File: anaconda-tb
none
File: anaconda.log
none
File: environ
none
File: journalctl
none
File: lsblk_output
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: ifcfg.log
none
File: packaging.log none

Description Petr Schindler 2014-06-04 08:31:17 UTC
Description of problem:
I used anaconda from comandline to install to image file (anaconda --image=test.img). At the end of the installation there is button for Reboot, instead of Quit. So I clicked reboot and than the anaconda fell.

Version-Release number of selected component:
anaconda-core-21.39-1.fc21.x86_64

The following was filed automatically by anaconda:
anaconda 21.39-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 686, in _setName
    raise errors.DeviceError("Cannot rename existing device.")
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 406, in <lambda>
    lambda s, v: s._setName(v),
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 4253, in _postTeardown
    self.name = "tmploop%d" % self.id
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 870, in teardown
    self._postTeardown(recursive=recursive)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 365, in teardownParents
    parent.teardown(recursive=recursive)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 875, in _postTeardown
    self.teardownParents(recursive=recursive)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 870, in teardown
    self._postTeardown(recursive=recursive)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 2108, in deactivate
    StorageDevice.teardown(self, recursive=recursive)
  File "/sbin/anaconda", line 79, in exitHandler
    dev.deactivate(recursive=True)
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
DeviceError: Cannot rename existing device.

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda --image=test.img
cmdline_file:   BOOT_IMAGE=/vmlinuz-3.15.0-0.rc7.git4.2.fc21.x86_64 root=UUID=3c3dedd5-e971-4ac4-96dd-aa3ac3c61882 ro rd.lvm.lv=main/root rd.luks.uuid=luks-e9ed0c8b-261b-465a-94f5-5c1e5064eae6 rd.lvm.lv=main/swap rhgb quiet LANG=en_US.UTF-8
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.15.0-0.rc7.git4.2.fc21.x86_64
other involved packages: python-libs-2.7.6-8.fc21.x86_64, python-blivet-0.54-1.fc21.noarch
product:        Fedora
release:        Fedora release 21 (Rawhide)
type:           anaconda
version:        rawhide

Comment 1 Petr Schindler 2014-06-04 08:31:30 UTC
Created attachment 902042 [details]
File: anaconda-tb

Comment 2 Petr Schindler 2014-06-04 08:31:31 UTC
Created attachment 902043 [details]
File: anaconda.log

Comment 3 Petr Schindler 2014-06-04 08:31:33 UTC
Created attachment 902044 [details]
File: environ

Comment 4 Petr Schindler 2014-06-04 08:31:42 UTC
Created attachment 902045 [details]
File: journalctl

Comment 5 Petr Schindler 2014-06-04 08:31:43 UTC
Created attachment 902046 [details]
File: lsblk_output

Comment 6 Petr Schindler 2014-06-04 08:31:45 UTC
Created attachment 902047 [details]
File: nmcli_dev_list

Comment 7 Petr Schindler 2014-06-04 08:31:46 UTC
Created attachment 902048 [details]
File: os_info

Comment 8 Petr Schindler 2014-06-04 08:31:48 UTC
Created attachment 902049 [details]
File: program.log

Comment 9 Petr Schindler 2014-06-04 08:31:50 UTC
Created attachment 902050 [details]
File: storage.log

Comment 10 Petr Schindler 2014-06-04 08:31:51 UTC
Created attachment 902051 [details]
File: ifcfg.log

Comment 11 Petr Schindler 2014-06-04 08:31:54 UTC
Created attachment 902052 [details]
File: packaging.log

Comment 12 Martin Kolman 2014-06-04 10:50:28 UTC
*** Bug 1104607 has been marked as a duplicate of this bug. ***

Comment 13 Adam Williamson 2014-06-04 22:31:04 UTC
Another user experienced a similar problem:

Happens on start of liveinst on a current Rawhide-based live image (anaconda 21.39), in a VM with an existing btrfs install of Rawhide on its disk. (That seems to be important).

cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=20140604-grubby-x86_64 rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
hashmarkername: anaconda
kernel:         3.15.0-0.rc8.git1.2.fc21.x86_64
other involved packages: python-libs-2.7.6-9.fc21.x86_64, python-blivet-0.54-1.fc21.noarch
package:        anaconda-core-21.39-1.fc21.x86_64
packaging.log:  
product:        Fedora
reason:         DeviceError: Cannot rename existing device.
release:        Fedora release 21 (Rawhide)
version:        rawhide

Comment 14 Adam Williamson 2014-06-04 22:40:52 UTC
I'm not sure #1104607 is really a dupe of this. Or, at least, they may share the same underlying cause - dlehman mentions in passing "the places where you replaced setting self._name with setting self.name" - but the patch you've posted - https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-June/011389.html - is not sufficient to fix all the resulting bugs.

#1104607 happens on *startup* of install when there is an existing btrfs volume on an attached disk (I believe). I don't think it has to do with the name of a loop device during teardown.

Comment 15 Martin Kolman 2014-06-09 08:11:24 UTC
*** Bug 1105858 has been marked as a duplicate of this bug. ***

Comment 16 David Shea 2014-06-17 14:00:26 UTC
This should be fixed by 67c8140b1c8c210afa2847b9a90866b89982c2f7