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-13 19:30:28 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 752661, 752664    
Description Flags
libreport-2012-10-23-04:22:40-671.tar.gz none

Description Kamil Páral 2012-10-23 04:45:28 EDT
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
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/deviceaction.py", line 286, in execute
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 323, in processActions
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/__init__.py", line 357, in doIt
  File "/usr/lib/python2.7/site-packages/pyanaconda/storage/__init__.py", line 195, in turnOnFilesystems
  File "/usr/lib/python2.7/site-packages/pyanaconda/install.py", line 107, in doInstall
  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 04:46:06 EDT
Created attachment 631956 [details]
Comment 2 Kamil Páral 2012-10-23 04:46:10 EDT
Created attachment 631957 [details]
Comment 3 Kamil Páral 2012-10-23 04:46:14 EDT
Created attachment 631958 [details]
Comment 4 Kamil Páral 2012-10-23 04:46:17 EDT
Created attachment 631959 [details]
Comment 5 Kamil Páral 2012-10-23 04:46:27 EDT
Created attachment 631960 [details]
Comment 6 Kamil Páral 2012-10-23 04:47:32 EDT
Created attachment 631961 [details]
Comment 7 Kamil Páral 2012-10-23 04:51:33 EDT
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 
Comment 8 Adam Williamson 2012-10-27 14:45:03 EDT
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 13:46:57 EDT
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 14:29:03 EST
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 10:32:43 EST
I tried to reproduce the situation with anaconda 18.37 and it seems to be fixed.
Comment 12 Adam Williamson 2012-12-13 19:30:28 EST
18.36 went stable and 18.37.2 is about to, so let's just close this up.