Bug 1654816

Summary: ValueError: device is already in tree
Product: [Fedora] Fedora Reporter: Randy <boyd.randall>
Component: python-blivetAssignee: Blivet Maintenance Team <blivet-maint-list>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: amulhern, anaconda-maint-list, blivet-maint-list, japokorn, jkonecny, jonathan, kellin, mkolman, pbrobinson, rvykydal, sbueno, vanmeeuwen+fedora, vponcova, vtrefny, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a4918c8d39364f69b9763cc8b9ff469f7424958693789394cc08f8c18f48e5e2;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-06 12:49:05 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: dbus.log
none
File: environ
none
File: journalctl
none
File: lsblk_output
none
File: lvm.log
none
File: nmcli_dev_list
none
File: os_info
none
File: program.log
none
File: storage.log
none
File: ifcfg.log none

Description Randy 2018-11-29 18:30:07 UTC
Description of problem:
Booted Workstation DVD then selected "Install to disk" option. Failure occurs without doing anything else.

Version-Release number of selected component:
anaconda-core-29.24.7-1.fc29.x86_64

The following was filed automatically by anaconda:
anaconda 29.24.7 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.7/site-packages/blivet/devicetree.py", line 158, in _add_device
    raise ValueError("device is already in tree")
  File "/usr/lib/python3.7/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/blivet/populator/helpers/partition.py", line 112, in run
    self._devicetree._add_device(device)
  File "/usr/lib/python3.7/site-packages/blivet/populator/populator.py", line 264, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.7/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/blivet/populator/populator.py", line 461, in _populate
    self.handle_device(dev)
  File "/usr/lib/python3.7/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/blivet/populator/populator.py", line 413, in populate
    self._populate()
  File "/usr/lib/python3.7/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/blivet/blivet.py", line 161, in reset
    self.devicetree.populate(cleanup_only=cleanup_only)
  File "/usr/lib/python3.7/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/storage/osinstall.py", line 1738, in reset
    super().reset(cleanup_only=cleanup_only)
  File "/usr/lib/python3.7/site-packages/blivet/threads.py", line 53, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/storage/osinstall.py", line 2298, in storage_initialize
    storage.reset()
  File "/usr/lib64/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.7/site-packages/pyanaconda/threading.py", line 286, in run
    threading.Thread.run(self)
ValueError: device is already in tree

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:/dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=/images/pxeboot/vmlinuz root=live:CDLABEL=Fedora-WS-Live-29-1-2 rd.live.image quiet
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.18.16-300.fc29.x86_64
other involved packages: python3-blivet-3.1.1-2.fc29.noarch, python3-libs-3.7.0-9.fc29.x86_64
product:        Fedora
release:        Fedora release 29 (Twenty Nine)
type:           anaconda
version:        29

Comment 1 Randy 2018-11-29 18:30:13 UTC
Created attachment 1509896 [details]
File: anaconda-tb

Comment 2 Randy 2018-11-29 18:30:15 UTC
Created attachment 1509897 [details]
File: anaconda.log

Comment 3 Randy 2018-11-29 18:30:16 UTC
Created attachment 1509898 [details]
File: dbus.log

Comment 4 Randy 2018-11-29 18:30:18 UTC
Created attachment 1509899 [details]
File: environ

Comment 5 Randy 2018-11-29 18:30:20 UTC
Created attachment 1509900 [details]
File: journalctl

Comment 6 Randy 2018-11-29 18:30:21 UTC
Created attachment 1509901 [details]
File: lsblk_output

Comment 7 Randy 2018-11-29 18:30:23 UTC
Created attachment 1509902 [details]
File: lvm.log

Comment 8 Randy 2018-11-29 18:30:24 UTC
Created attachment 1509903 [details]
File: nmcli_dev_list

Comment 9 Randy 2018-11-29 18:30:25 UTC
Created attachment 1509904 [details]
File: os_info

Comment 10 Randy 2018-11-29 18:30:26 UTC
Created attachment 1509905 [details]
File: program.log

Comment 11 Randy 2018-11-29 18:30:28 UTC
Created attachment 1509906 [details]
File: storage.log

Comment 12 Randy 2018-11-29 18:30:29 UTC
Created attachment 1509907 [details]
File: ifcfg.log

Comment 13 Vendula Poncova 2018-11-30 13:53:17 UTC
It seems to be an issue in the storage configuration library. Reassigning to blivet.

Comment 14 Randy 2018-12-02 01:39:19 UTC
Further research indicated this issue may be due to an old RAID set. Two of the disks were once a shadowed pair, but have not been used as such for more than a year since the system was upgraded from Fedora-14 to CentOS 7 with no issues. Only one of the mirrored disks were used. The other was left unmounted.

To test if the split RAID set was causing the installation problem, unplugged one of the disks. Installation then proceeded with no more issues. After completing the installation, plugged the disk back in then rebooted and everything works as expected. The second disk of the old RAID set is not used and is still not mounted. Will reformat it at some point to make sure no further problems arise.

From the submitters viewpoint this issue can be considered resolved.

Comment 15 Jan 2019-09-06 12:49:05 UTC
Hi Randy,
this exception usually happens when blivet encounters duplicate UUID. Blivet uses UUID for device identification and gets confused when the same value is encountered twice.
In your case it seems that sdc and sdd were the culprits.
The most common cause of duplicate UUID is cloning disks (e.g. for RAID). That would explain why temporary disconnection of the disk helped.
I am afraid that we cannot do much in this case.
In newer versions of blivet this issue at least gets a better description, though.

I am closing the bug but feel free to reopen it if you have any questions.

Have a nice day,
Jan