Bug 1414953 - ValueError: device is already in tree
Summary: ValueError: device is already in tree
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:80223a43d2b835ef540081140a3...
: 1436578 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-19 19:46 UTC by Ingvar Hagelund
Modified: 2017-03-28 08:49 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-19 20:09:21 UTC
Type: ---


Attachments (Terms of Use)
File: anaconda-tb (559.15 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: anaconda.log (18.86 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: dnf.librepo.log (118.81 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: environ (482 bytes, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: hawkey.log (1.34 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: lsblk_output (2.83 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: nmcli_dev_list (1.49 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: os_info (449 bytes, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: program.log (10.75 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: storage.log (38.99 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: syslog (350.24 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: ifcfg.log (2.25 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details
File: packaging.log (1.41 KB, text/plain)
2017-01-19 19:47 UTC, Ingvar Hagelund
no flags Details

Description Ingvar Hagelund 2017-01-19 19:46:52 UTC
Description of problem:
Boot anaconda with an existing mdraid RAID1. Crash.

Reproduced with iso Fedora-Server-netinst-x86_64-25-1.3.iso. It has anaconda-25.20.8-1.

Reproduce:

Start with a system with two equal sized empty disks, sda and sdb. Boot inst.rescue. Set up a RAID1 by something like this (this is from memory, not pasted from actual commands)

fdisk /dev/sda
n (new)
p (primary)
1 (partition 1)
<enter> (default start block)
+1024M (size)
t (type)
fd (linux raid autodetect)
n (new)
p (primary)
2 (partition 2)
<enter> (default next start block)
<enter> (size: rest of disk)
t (type)
fd (linux raid autodetect)

w (write and exit)

sfdisk -dump /dev/sda > dump
sfdisk /dev/sdb < dump

mdadm --create /dev/md/BOOT --level=1 --raid-disks=2 /dev/sda1 /dev/sdb1
mdadm --create /dev/md/SYS --level=1 --raid-disks=2 /dev/sda2 /dev/sdb2

Check that it syncs by

cat /proc/mdstat
cat /proc/mdstat
cat /proc/mdstat

Let it sync for some seconds, then reboot, and run the normal GUI installer. It crashes at startup.

Version-Release number of selected component:
anaconda-25.20.8-1

The following was filed automatically by anaconda:
anaconda 25.20.8-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.5/site-packages/blivet/devicetree.py", line 148, in _add_device
    raise ValueError("device is already in tree")
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/helpers/partition.py", line 111, in run
    self._devicetree._add_device(device)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 306, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 154, in _add_slave_devices
    self.handle_device(slave_info)
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/helpers/mdraid.py", line 55, in run
    self._devicetree._add_slave_devices(self.data)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 306, in handle_device
    device = helper_class(self, info).run()
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/helpers/mdraid.py", line 216, in run
    self._devicetree.handle_device(array_info, update_orig_fmt=True)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 345, in handle_format
    helper_class(self, info, device).run()
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 318, in handle_device
    self.handle_format(info, device)
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 518, in _populate
    self.handle_device(dev)
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/populator/populator.py", line 451, in populate
    self._populate()
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/blivet.py", line 271, in reset
    self.devicetree.populate(cleanup_only=cleanup_only)
  File "/usr/lib/python3.5/site-packages/blivet/threads.py", line 45, in run_with_lock
    return m(*args, **kwargs)
  File "/usr/lib/python3.5/site-packages/blivet/osinstall.py", line 1175, in storage_initialize
    storage.reset()
  File "/usr/lib64/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.5/site-packages/pyanaconda/threads.py", line 251, in run
    threading.Thread.run(self, *args, **kwargs)
ValueError: device is already in tree

Additional info:
addons:         com_redhat_kdump, com_redhat_docker
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=Fedora-S-dvd-x86_64-25 inst.sshd
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.8.6-300.fc25.x86_64
product:        Fedora
release:        Cannot get release name.
type:           anaconda
version:        25

Comment 1 Ingvar Hagelund 2017-01-19 19:47:00 UTC
Created attachment 1242559 [details]
File: anaconda-tb

Comment 2 Ingvar Hagelund 2017-01-19 19:47:02 UTC
Created attachment 1242560 [details]
File: anaconda.log

Comment 3 Ingvar Hagelund 2017-01-19 19:47:05 UTC
Created attachment 1242561 [details]
File: dnf.librepo.log

Comment 4 Ingvar Hagelund 2017-01-19 19:47:06 UTC
Created attachment 1242562 [details]
File: environ

Comment 5 Ingvar Hagelund 2017-01-19 19:47:08 UTC
Created attachment 1242563 [details]
File: hawkey.log

Comment 6 Ingvar Hagelund 2017-01-19 19:47:09 UTC
Created attachment 1242564 [details]
File: lsblk_output

Comment 7 Ingvar Hagelund 2017-01-19 19:47:11 UTC
Created attachment 1242565 [details]
File: nmcli_dev_list

Comment 8 Ingvar Hagelund 2017-01-19 19:47:12 UTC
Created attachment 1242566 [details]
File: os_info

Comment 9 Ingvar Hagelund 2017-01-19 19:47:14 UTC
Created attachment 1242567 [details]
File: program.log

Comment 10 Ingvar Hagelund 2017-01-19 19:47:17 UTC
Created attachment 1242568 [details]
File: storage.log

Comment 11 Ingvar Hagelund 2017-01-19 19:47:20 UTC
Created attachment 1242569 [details]
File: syslog

Comment 12 Ingvar Hagelund 2017-01-19 19:47:22 UTC
Created attachment 1242570 [details]
File: ifcfg.log

Comment 13 Ingvar Hagelund 2017-01-19 19:47:23 UTC
Created attachment 1242571 [details]
File: packaging.log

Comment 14 Ingvar Hagelund 2017-01-19 19:56:23 UTC
The image has md5sum
b3c2ae50865d16f7f5861bb8f4dd65da  Fedora-Server-netinst-x86_64-25-1.3.iso

Comment 15 David Lehman 2017-01-19 20:09:21 UTC
You are using sfdisk to clone sda, but this does not generate a new UUID for sdb. As a result, your disks' partition tables have the same UUID (sda/sdb), as do sda1/sdb1 and so on. UUIDs must be unique, of course, so you'll have to remedy this on your end. Thanks for the report and good luck.

Comment 16 Danilo Marcucci 2017-03-28 08:49:33 UTC
*** Bug 1436578 has been marked as a duplicate of this bug. ***


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