Bug 1252052 - blivet.errors.DeviceError: ('cannot replace active format', 'fedora_dhcp45-root')
Summary: blivet.errors.DeviceError: ('cannot replace active format', 'fedora_dhcp45-ro...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vratislav Podzimek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:37a26951cbba423c77d289aef46...
: 1212920 1252450 (view as bug list)
Depends On:
Blocks: F23BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2015-08-10 14:48 UTC by Martin Kolman
Modified: 2015-08-31 18:07 UTC (History)
13 users (show)

Fixed In Version: 23.19.1-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-27 17:58:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (695.02 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: anaconda.log (71.46 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: dnf.log (2.64 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: environ (494 bytes, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: ks.cfg (1.73 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: lsblk_output (1.54 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: nmcli_dev_list (2.53 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: os_info (451 bytes, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: program.log (135.10 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: storage.log (271.56 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: syslog (73.76 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: ifcfg.log (3.72 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details
File: packaging.log (1.62 KB, text/plain)
2015-08-10 14:48 UTC, Martin Kolman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1255969 0 unspecified CLOSED blivet.errors.DeviceError: ('cannot replace active format', 'VolGroup-lv_root') 2021-02-22 00:41:40 UTC

Internal Links: 1255969

Description Martin Kolman 2015-08-10 14:48:30 UTC
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 14:48:36 UTC
Created attachment 1061120 [details]
File: anaconda-tb

Comment 2 Martin Kolman 2015-08-10 14:48:38 UTC
Created attachment 1061121 [details]
File: anaconda.log

Comment 3 Martin Kolman 2015-08-10 14:48:39 UTC
Created attachment 1061122 [details]
File: dnf.log

Comment 4 Martin Kolman 2015-08-10 14:48:40 UTC
Created attachment 1061123 [details]
File: environ

Comment 5 Martin Kolman 2015-08-10 14:48:42 UTC
Created attachment 1061124 [details]
File: ks.cfg

Comment 6 Martin Kolman 2015-08-10 14:48:43 UTC
Created attachment 1061125 [details]
File: lsblk_output

Comment 7 Martin Kolman 2015-08-10 14:48:44 UTC
Created attachment 1061126 [details]
File: nmcli_dev_list

Comment 8 Martin Kolman 2015-08-10 14:48:45 UTC
Created attachment 1061127 [details]
File: os_info

Comment 9 Martin Kolman 2015-08-10 14:48:48 UTC
Created attachment 1061128 [details]
File: program.log

Comment 10 Martin Kolman 2015-08-10 14:48:51 UTC
Created attachment 1061129 [details]
File: storage.log

Comment 11 Martin Kolman 2015-08-10 14:48:53 UTC
Created attachment 1061130 [details]
File: syslog

Comment 12 Martin Kolman 2015-08-10 14:48:54 UTC
Created attachment 1061131 [details]
File: ifcfg.log

Comment 13 Martin Kolman 2015-08-10 14:48:55 UTC
Created attachment 1061132 [details]
File: packaging.log

Comment 14 Vratislav Podzimek 2015-08-12 07:56:05 UTC
*** Bug 1252450 has been marked as a duplicate of this bug. ***

Comment 15 Vratislav Podzimek 2015-08-12 09:30:53 UTC
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 10:45:41 UTC
https://github.com/rhinstaller/blivet/pull/201

Comment 17 Vratislav Podzimek 2015-08-12 10:46:56 UTC
updates.img:
http://vpodzime.fedorapeople.org/1252052_updates.img

Comment 18 Fedora Blocker Bugs Application 2015-08-12 12:13:18 UTC
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 12:35:52 UTC
According to Vratislav, this probably affects all installations with pre-existing LVM/LVMthinp layout.

Comment 20 Adam Williamson 2015-08-12 14:03:19 UTC
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 09:40:51 UTC
bug #1212920 is probably a duplicate, please check.

Comment 22 Adam Williamson 2015-08-20 16:39:55 UTC
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 07:01:09 UTC
*** Bug 1212920 has been marked as a duplicate of this bug. ***

Comment 24 Adam Williamson 2015-08-22 14:58:49 UTC
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 16:25:33 UTC
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 17:58:22 UTC
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 17:46:09 UTC
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 17:48:24 UTC
never mind, sounds like he had 1.12.

Comment 29 David Shea 2015-08-31 18:07:24 UTC
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.