Bug 1252052 - blivet.errors.DeviceError: ('cannot replace active format', 'fedora_dhcp45-root')
blivet.errors.DeviceError: ('cannot replace active format', 'fedora_dhcp45-ro...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: python-blivet (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Vratislav Podzimek
Fedora Extras Quality Assurance
abrt_hash:37a26951cbba423c77d289aef46...
:
: 1212920 1252450 (view as bug list)
Depends On:
Blocks: F23BetaBlocker
  Show dependency treegraph
 
Reported: 2015-08-10 10:48 EDT by Martin Kolman
Modified: 2015-08-31 14:07 EDT (History)
13 users (show)

See Also:
Fixed In Version: 23.19.1-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-27 13:58:36 EDT
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 (695.02 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: anaconda.log (71.46 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: dnf.log (2.64 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: environ (494 bytes, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: ks.cfg (1.73 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: lsblk_output (1.54 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: nmcli_dev_list (2.53 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: os_info (451 bytes, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: program.log (135.10 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: storage.log (271.56 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: syslog (73.76 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: ifcfg.log (3.72 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details
File: packaging.log (1.62 KB, text/plain)
2015-08-10 10:48 EDT, Martin Kolman
no flags Details

  None (edit)
Description Martin Kolman 2015-08-10 10:48:30 EDT
Description of problem:
Autopart on two virtio disks, confirmed delete-all, Anaconda crashed.

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

The following was filed automatically by anaconda:
anaconda 23.17-1 exception report
Traceback (most recent call first):
  File "/tmp/updates/blivet/devices/storage.py", line 697, in _setFormat
    raise errors.DeviceError("cannot replace active format", self.name)
  File "/tmp/updates/blivet/devices/lvm.py", line 646, in _setFormat
    super(LVMLogicalVolumeDevice, self)._setFormat(fmt)
  File "/tmp/updates/blivet/devices/storage.py", line 742, in <lambda>
    lambda d,f: d._setFormat(f),
  File "/tmp/updates/blivet/deviceaction.py", line 669, in apply
    self.device.format = None
  File "/tmp/updates/blivet/devicetree.py", line 323, in registerAction
    action.apply()
  File "/tmp/updates/blivet/devicetree.py", line 275, in recursiveRemove
    self.registerAction(ActionDestroyFormat(leaf))
  File "/tmp/updates/blivet/blivet.py", line 611, in recursiveRemove
    self.devicetree.recursiveRemove(device)
  File "/tmp/updates/pyanaconda/ui/gui/spokes/lib/resize.py", line 422, in _recursiveRemove
    self.storage.recursiveRemove(device)
  File "/tmp/updates/pyanaconda/ui/gui/spokes/lib/resize.py", line 447, in _scheduleActions
    self._recursiveRemove(device)
blivet.errors.DeviceError: ('cannot replace active format', 'fedora_dhcp45-root')

Additional info:
addons:         com_redhat_kdump
cmdline:        /usr/bin/python3  /sbin/anaconda
cmdline_file:   initrd=/test/mk/rawhide/initrd.img inst.stage2=http://cobra02/trees/mk/rawhide/ nokill updates=http://cobra02/ks/mk/master_updates.img resolution=1024x768 ks=http://cobra02/ks/mk/testing.ks BOOT_IMAGE=/test/mk/rawhide/vmlinuz 
dnf.rpm.log:    Aug 10 14:38:20 INFO --- logging initialized ---
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.2.0-0.rc5.git3.1.fc24.x86_64
product:        Fedora
release:        Cannot get release name.
type:           anaconda
version:        Rawhide
Comment 1 Martin Kolman 2015-08-10 10:48:36 EDT
Created attachment 1061120 [details]
File: anaconda-tb
Comment 2 Martin Kolman 2015-08-10 10:48:38 EDT
Created attachment 1061121 [details]
File: anaconda.log
Comment 3 Martin Kolman 2015-08-10 10:48:39 EDT
Created attachment 1061122 [details]
File: dnf.log
Comment 4 Martin Kolman 2015-08-10 10:48:40 EDT
Created attachment 1061123 [details]
File: environ
Comment 5 Martin Kolman 2015-08-10 10:48:42 EDT
Created attachment 1061124 [details]
File: ks.cfg
Comment 6 Martin Kolman 2015-08-10 10:48:43 EDT
Created attachment 1061125 [details]
File: lsblk_output
Comment 7 Martin Kolman 2015-08-10 10:48:44 EDT
Created attachment 1061126 [details]
File: nmcli_dev_list
Comment 8 Martin Kolman 2015-08-10 10:48:45 EDT
Created attachment 1061127 [details]
File: os_info
Comment 9 Martin Kolman 2015-08-10 10:48:48 EDT
Created attachment 1061128 [details]
File: program.log
Comment 10 Martin Kolman 2015-08-10 10:48:51 EDT
Created attachment 1061129 [details]
File: storage.log
Comment 11 Martin Kolman 2015-08-10 10:48:53 EDT
Created attachment 1061130 [details]
File: syslog
Comment 12 Martin Kolman 2015-08-10 10:48:54 EDT
Created attachment 1061131 [details]
File: ifcfg.log
Comment 13 Martin Kolman 2015-08-10 10:48:55 EDT
Created attachment 1061132 [details]
File: packaging.log
Comment 14 Vratislav Podzimek 2015-08-12 03:56:05 EDT
*** Bug 1252450 has been marked as a duplicate of this bug. ***
Comment 15 Vratislav Podzimek 2015-08-12 05:30:53 EDT
Okay, so I did a little bit of debugging and here's what happens:
1. blivet tries to verify that it is not removing an active format
2. format is considered active if it's mounted
3. to check if a format is mounted the mountsCache is used
4. to prevent issues with device having multiple symlinks, blivet tries to resolve the device spec to the raw device spec (e.g. /dev/dm-4 for /dev/fedora/root) using udev
5. the root LV is not activated, so udev doesn't know about it
6. the resolved device spec is None
7. mount points that have no device are returned for the None device from mountsCache
8. blivet thinks the root LV is mounted
10. exception raised
Comment 16 Vratislav Podzimek 2015-08-12 06:45:41 EDT
https://github.com/rhinstaller/blivet/pull/201
Comment 17 Vratislav Podzimek 2015-08-12 06:46:56 EDT
updates.img:
http://vpodzime.fedorapeople.org/1252052_updates.img
Comment 18 Fedora Blocker Bugs Application 2015-08-12 08:13:18 EDT
Proposed as a Blocker for 23-beta by Fedora user vpodzime using the blocker tracking app because:

 This clearly violates the following criterion:

 Guided partitioning

When using the guided partitioning flow, the installer must be able to:

    Cleanly install to a disk with a valid ms-dos or gpt disk label and partition table which contains existing data and sufficient unpartitioned space for a Fedora installation
    Complete an installation using any combination of disk configuration options it allows the user to select
    Remove existing storage volumes to free up space, at the user's direction
    Reject or disallow invalid disk and volume configurations without crashing.
Comment 19 Kamil Páral 2015-08-12 08:35:52 EDT
According to Vratislav, this probably affects all installations with pre-existing LVM/LVMthinp layout.
Comment 20 Adam Williamson 2015-08-12 10:03:19 EDT
Yeah, I saw what was probably this when installing my new Fedlet image over an existing Fedlet install the other day. Couldn't file because Fedlet is debranded.
Comment 21 Alexander Todorov 2015-08-18 05:40:51 EDT
bug #1212920 is probably a duplicate, please check.
Comment 22 Adam Williamson 2015-08-20 12:39:55 EDT
Discussed at 2015-08-20 blocker review meeting: http://meetbot-raw.fedoraproject.org/fedora-blocker-review/2015-08-20/f23-blocker-review.2015-08-20-16.05.log.txt . Accepted as a blocker per criteria cited in #c18.
Comment 23 Vratislav Podzimek 2015-08-21 03:01:09 EDT
*** Bug 1212920 has been marked as a duplicate of this bug. ***
Comment 24 Adam Williamson 2015-08-22 10:58:49 EDT
This does not appear to be fully fixed. I hit it (or a variant) when testing on a live image with anaconda and blivet updated. See https://bugzilla.redhat.com/show_bug.cgi?id=1255969 (which has the updated logs).
Comment 25 Fedora Update System 2015-08-22 12:25:33 EDT
anaconda-23.19.1-1.fc23, python-blivet-1.12.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update anaconda python-blivet'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-13831
Comment 26 Fedora Update System 2015-08-27 13:58:22 EDT
anaconda-23.19.1-1.fc23, python-blivet-1.12.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 27 Adam Williamson 2015-08-31 13:46:09 EDT
David Shea just reported in passing that he'd seen this with a current Rawhide compose, which should have blivet 1.13. I'm really not sure this is fully fixed, given https://bugzilla.redhat.com/show_bug.cgi?id=1255969 .

<davidshea> cannot replace active format
* davidshea tries again
<adamw> wait a minute, you hit that too? with current anaconda/blivet?
<davidshea> yeah I guess
 "current" being the last rawhide compose, which looks like 8/28
<adamw> it was supposed to be fixed...
Comment 28 Adam Williamson 2015-08-31 13:48:24 EDT
never mind, sounds like he had 1.12.
Comment 29 David Shea 2015-08-31 14:07:24 EDT
8/28 was a lie, apparently. .buildstamp says 8/20. Sorry for the noise.

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