Bug 103733

Summary: kickstart crash when installing on existing LVM logical volume
Product: [Retired] Red Hat Linux Beta Reporter: Pierre--Francois Honore <pfhonore>
Component: anacondaAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: beta1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-16 18:28:38 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: 100643    
Attachments:
Description Flags
dump of anaconda none

Description Pierre--Francois Honore 2003-09-04 13:50:48 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030708

Description of problem:
I am using kickstart to install Severn on LVM logical volumes. The first
installation performs well. PV (hda2), VG (phnpcg208) and LVs (root, usr, var,
... ) are created and formated.

The second time, I try to reinstall over the same LVs and not format
/dev/phnpcg208/local.

Here are the kickstart files that I use 
Install
--------
clearpart --linux 
part /boot	--size 16 	--fstype ext2	--asprimary 
part pv.02			--size 1 --grow --noformat
volgroup phnpcg208 pv.02
logvol /                --vgname=phnpcg208  --size=300		--name=root	--fstype ext3
logvol swap		--vgname=phnpcg208  --size 128		--name=swap
logvol /usr             --vgname=phnpcg208  --size=2500		--name=usr	--fstype ext3
logvol /tmp             --vgname=phnpcg208  --size=300		--name=tmp	--fstype ext3
logvol /var             --vgname=phnpcg208  --size=300		--name=var	--fstype ext3
logvol /usr/local	--vgname=phnpcg208  --size=1 --grow	--name=local	--fstype ext3

Re-install
--------
part /boot	--onpart=hda1	--size 16 	--fstype ext2 
part pv.02	--onpart=hda2	--size 1 --grow --noformat
volgroup phnpcg208 pv.02
logvol /                --vgname=phnpcg208  --size=300		--name=root	--fstype ext3
logvol swap		--vgname=phnpcg208  --size 128		--name=swap
logvol /usr             --vgname=phnpcg208  --size=2500		--name=usr	--fstype ext3
logvol /tmp             --vgname=phnpcg208  --size=300		--name=tmp	--fstype ext3
logvol /var             --vgname=phnpcg208  --size=300		--name=var	--fstype ext3
logvol /usr/local	--vgname=phnpcg208  --size=1 --grow	--name=local	--fstype ext3
--noformat


Version-Release number of selected component (if applicable):
anaconda-9.0.93-1

How reproducible:
Always

Steps to Reproduce:
1. kickstart Severn on LVM logical volume with option clearpart
2. kickstart using the existing partions without clearpart
    

Actual Results:  Traceback (most recent call last):
  File "/usr/bin/anaconda", line 1025, in ?
    intf.run(id, dispatch, configFileData)
  File "/usr/lib/anaconda/gui.py", line 674, in run
    self.icw.run (self.runres, configFileData)
  File "/usr/lib/anaconda/gui.py", line 1415, in run
    self.setup_window(runres)
  File "/usr/lib/anaconda/gui.py", line 1387, in setup_window
    self.setScreen ()
  File "/usr/lib/anaconda/gui.py", line 1053, in setScreen
    (step, args) = self.dispatch.currentStep()
  File "/usr/lib/anaconda/dispatch.py", line 273, in currentStep
    self.gotoNext()
  File "/usr/lib/anaconda/dispatch.py", line 168, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/dispatch.py", line 236, in moveStep
    rc = apply(func, self.bindArgs(args))
  File "/usr/lib/anaconda/partitioning.py", line 95, in partitioningComplete
    entry = request.toEntry(partitions)
  File "/usr/lib/anaconda/partRequests.py", line 166, in toEntry
    device = self.getDevice(partitions)
  File "/usr/lib/anaconda/partRequests.py", line 716, in getDevice
    pvs.append(partitions.getRequestByID(pv).getDevice(partitions))
AttributeError: 'NoneType' object has no attribute 'getDevice'

Expected Results:  formating /dev/phnpcg208/root, /dev/phnpcg208/usr,
/dev/phnpcg208/var, /dev/phnpcg208/var
presevering /dev/phnpcg208/local
installing

Additional info:

If kickstart contains the option upgrade instead of install then it does not crash

With a manual installation (without kickstart), I am able to select the pre
existing LV and perform the re-installation.

If I replace the directives : logvol by part (part / --onpart=phnpcg208/root
--fstype ext3, ...) then anaconda stops saying  that /dev/phnpcg208/root does
not exist. Even I add a %pre script :
vgscan
vgchange -ay

Comment 1 Pierre--Francois Honore 2003-09-04 14:56:08 UTC
Created attachment 94201 [details]
dump of anaconda 

anacdump.txt

Comment 2 Jeremy Katz 2003-10-16 18:28:38 UTC
You need to add --useexisting to your volgroup and logvol lines to reuse
preexisting volume groups and logical volumes.