Bug 869185

Summary: Crash when reclaiming space on disks with incomplete LVM
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: anaconda-maint-list, awilliam, g.kaviyarasu, jonathan, joshua, redhat, robatino, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedNTH AcceptedBlocker
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-14 00:30:28 UTC Type: Bug
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: 752661, 752664    
Attachments:
Description Flags
anaconda-tb-bGoTR7
none
anaconda.log
none
program.log
none
storage.log
none
syslog
none
libreport-2012-10-23-04:22:40-671.tar.gz none

Description Kamil Páral 2012-10-23 08:45:28 UTC
Description of problem:
I tried to install to a disk that has some leftover LVM partition on it. I used "Reclaim space" dialog and selected the partition to be removed. I think that the disk I selected may contain just a partial LVM layout (the LV that's on the disk was part of a larger VG spanning across several disks, but now only this single disk remained). That's why the vgreduce might fail - the volume group is incomplete and broken. Still, it shouldn't crash.

(Libreport failed too, so reporting manually).

anaconda 18.19 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/devicelibs/lvm.py", line 297, in vgreduce
    raise LVMError("vgreduce failed for %s: %s" % (vg_name, msg))
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/devices.py", line 2158, in _destroy
    lvm.vgreduce(self.name, [], rm=True)
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/devices.py", line 816, in destroy
    self._destroy()
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/deviceaction.py", line 286, in execute
    self.device.destroy()
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 323, in processActions
    action.execute()
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/__init__.py", line 357, in doIt
    self.devicetree.processActions()
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/__init__.py", line 195, in turnOnFilesystems
    storage.doIt()
  File "/usr/lib/python2.7/site-packages/pyanaconda/install.py", line 107, in doInstall
    turnOnFilesystems(storage)
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/site-packages/pyanaconda/threads.py", line 91, in run
    threading.Thread.run(self, *args, **kwargs)
LVMError: vgreduce failed for vg_foobar: running lvm vgreduce --config  devices { filter=["r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|","r|/vg_foobar$|","r|/sdb1$|","r|/sda3$|","r|/sda2$|","r|/sda1$|","r|/sda$|"] }  --removemissing --force vg_foobar failed

Version-Release number of selected component (if applicable):
F18 Beta TC6
anaconda 18.19

How reproducible:
probably always

Steps to Reproduce:
1. create a F17 LVM installation spanning two disks
2. erase/remove the first disk
3. try to install F18 on the second disk (only a single PV/single LV there, mark as Delete)

Comment 1 Kamil Páral 2012-10-23 08:46:06 UTC
Created attachment 631956 [details]
anaconda-tb-bGoTR7

Comment 2 Kamil Páral 2012-10-23 08:46:10 UTC
Created attachment 631957 [details]
anaconda.log

Comment 3 Kamil Páral 2012-10-23 08:46:14 UTC
Created attachment 631958 [details]
program.log

Comment 4 Kamil Páral 2012-10-23 08:46:17 UTC
Created attachment 631959 [details]
storage.log

Comment 5 Kamil Páral 2012-10-23 08:46:27 UTC
Created attachment 631960 [details]
syslog

Comment 6 Kamil Páral 2012-10-23 08:47:32 UTC
Created attachment 631961 [details]
libreport-2012-10-23-04:22:40-671.tar.gz

Comment 7 Kamil Páral 2012-10-23 08:51:33 UTC
This is probably a Final blocker:
 The installer must be able to create and install to any workable partition layout using any file system offered in a default installer configuration, LVM, software, hardware or BIOS RAID, or combination of the above 
https://fedoraproject.org/wiki/Fedora_18_Final_Release_Criteria

Comment 8 Adam Williamson 2012-10-27 18:45:03 UTC
Proposing as Beta NTH as well. We also have the problem that this is preventing re-testing of https://bugzilla.redhat.com/show_bug.cgi?id=862613 , so anaconda team, if you could provide Kamil with a fix for this, even as an updates.img, it would help.

Comment 9 Adam Williamson 2012-10-31 17:46:57 UTC
Discussed at 2012-10-31 NTH review meeting: http://meetbot.fedoraproject.org/fedora-qa/2012-10-31/f18beta-blocker-review-6.2012-10-31-16.00.log.txt . Accepted as NTH as it's a crasher in the installer. Also accepted as Final blocker per criterion cited in comment #7.

Comment 10 Chris Lumens 2012-12-05 19:29:03 UTC
Giving this a test here with the steps in the initial comment and anaconda-18.35, I am unable to reproduce this bug.  Can you please retest as well and verify?  Thanks.

Comment 11 Kamil Páral 2012-12-11 15:32:43 UTC
I tried to reproduce the situation with anaconda 18.37 and it seems to be fixed.

Comment 12 Adam Williamson 2012-12-14 00:30:28 UTC
18.36 went stable and 18.37.2 is about to, so let's just close this up.