Bug 1131754

Summary: DeviceError: ('cannot replace active format', 'sda2')
Product: [Fedora] Fedora Reporter: Michael Catanzaro <mcatanzaro+wrong-account-do-not-cc>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: anaconda-maint-list, g.kaviyarasu, jonathan, mcatanzaro+wrong-account-do-not-cc, robatino, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:ebadb6e6a78bf6cfb4c8fdf14e58d481c7b13fe7d49926ff28cadc19b3b7b0f1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-13 02:38:12 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:
Bug Depends On:    
Bug Blocks: 1043119    
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

Description Michael Catanzaro 2014-08-20 02:27:15 UTC
Description of problem:
I'm trying to install rawhide with a F22 Workstation Live CD. In Installation Selection, I checked free up extra space, then clicked Done. A popup appeared to let me delete partitions on my disk. I selected /dev/sda since I wanted to delete everything, then anaconda crashed.

I see /dev/sda2 in the backtrace. This is my swap partition. I guess anaconda needs to deactivate that before deleting it, or else it should not have been activated in the first place.

Version-Release number of selected component:
anaconda-core-22.3-1.fc22.x86_64

The following was filed automatically by anaconda:
anaconda 22.3-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 1040, in _setFormat
    raise errors.DeviceError("cannot replace active format", self.name)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 1601, in _setFormat
    StorageDevice._setFormat(self, fmt)
  File "/usr/lib/python2.7/site-packages/blivet/devices.py", line 1049, in <lambda>
    lambda d,f: d._setFormat(f),
  File "/usr/lib/python2.7/site-packages/blivet/deviceaction.py", line 626, in apply
    self.device.format = None
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 503, in registerAction
    action.apply()
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 1295, in destroyDevice
    self.devicetree.registerAction(ActionDestroyFormat(device))
  File "/usr/lib/python2.7/site-packages/blivet/__init__.py", line 818, in recursiveRemove
    self.destroyDevice(leaf)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 418, in _recursiveRemove
    self.storage.recursiveRemove(device)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ui/gui/spokes/lib/resize.py", line 443, in _scheduleActions
    self._recursiveRemove(device)
DeviceError: ('cannot replace active format', 'sda2')

Additional info:
cmdline:        /usr/bin/python  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=/isolinux/vmlinuz0 root=live:LABEL=Fedora-Live-Workstation-x86_64-r ro rd.live.image quiet rhgb rd.live.check
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         3.17.0-0.rc1.git0.1.fc22.x86_64
other involved packages: python-blivet-0.61-1.fc22.noarch, anaconda-gui-22.3-1.fc22.x86_64
product:        Fedora
release:        Fedora release 22 (Rawhide)
type:           anaconda
version:        rawhide

Comment 1 Michael Catanzaro 2014-08-20 02:27:20 UTC
Created attachment 928575 [details]
File: anaconda-tb

Comment 2 Michael Catanzaro 2014-08-20 02:27:21 UTC
Created attachment 928576 [details]
File: anaconda.log

Comment 3 Michael Catanzaro 2014-08-20 02:27:22 UTC
Created attachment 928577 [details]
File: environ

Comment 4 Michael Catanzaro 2014-08-20 02:27:25 UTC
Created attachment 928578 [details]
File: journalctl

Comment 5 Michael Catanzaro 2014-08-20 02:27:25 UTC
Created attachment 928579 [details]
File: lsblk_output

Comment 6 Michael Catanzaro 2014-08-20 02:27:26 UTC
Created attachment 928580 [details]
File: nmcli_dev_list

Comment 7 Michael Catanzaro 2014-08-20 02:27:27 UTC
Created attachment 928581 [details]
File: os_info

Comment 8 Michael Catanzaro 2014-08-20 02:27:28 UTC
Created attachment 928582 [details]
File: program.log

Comment 9 Michael Catanzaro 2014-08-20 02:27:30 UTC
Created attachment 928583 [details]
File: storage.log

Comment 10 Michael Catanzaro 2014-08-20 02:27:30 UTC
Created attachment 928584 [details]
File: ifcfg.log

Comment 11 Michael Catanzaro 2014-09-13 02:02:35 UTC
(In reply to Michael Catanzaro from comment #0)
> I guess
> anaconda needs to deactivate that before deleting it

Actually, I'm hitting this again now, and my swap partition is not even active, so I'm not sure what's going wrong. I am sure that I have no clue how to install Fedora, though.

Comment 12 Fedora Blocker Bugs Application 2014-09-13 02:05:52 UTC
Proposed as a Blocker for 21-alpha by Fedora user catanzaro using the blocker tracking app because:

 "When using a dedicated installer image, the installer must be able to complete an installation using the [graphical] installation interfaces."

I'm using a live image, so I guess this criterion doesn't technically apply, but that's surely an oversight as there won't be any "dedicated installer images" for Fedora Workstation.

Comment 13 Michael Catanzaro 2014-09-13 02:18:22 UTC
I can install if I first delete my swap partition with gnome-disks. It actually was active after all; not sure if I was blind or what when I wrote comment #11.

Comment 14 Michael Catanzaro 2014-09-13 02:38:12 UTC

*** This bug has been marked as a duplicate of bug 1114786 ***