Bug 492123

Summary: cmdline kickstart install with previously crypted partitions fails - AttributeError: InstallInterface instance has no attribute 'passphraseEntryWindow'
Product: [Fedora] Fedora Reporter: James Laska <jlaska>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: jgranado, jturner, pjones, rmaximo, tcallawa, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: NEEDSRETESTING
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-07 18:54:07 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: 495965    
Attachments:
Description Flags
ks.cfg none

Description James Laska 2009-03-25 13:46:35 UTC
Created attachment 336646 [details]
ks.cfg

A cmdline mode kickstart install in a KVM guest that has previously encrypted volumes fails with:

Waiting for NetworkManager to configure eth0...
Retrieving vguest1...
Looking for installation images on CD device /dev/sr0Waiting for NetworkManager to configure eth0...
Retrieving install.img...
Waiting for NetworkManager to configure eth0...
Retrieving updates-i586.img...
Running anaconda 11.5.0.37, the Fedora system installer - please wait...
Finding storage devices...
Traceback (most recent call last):
  File "/tmp/updates/anaconda", line 996, in <module>
    kickstart.processKickstartFile(anaconda, opts.ksfile)
  File "/tmp/updates/kickstart.py", line 1094, in processKickstartFile
    storage.storageInitialize(anaconda)
  File "/tmp/updates/storage/__init__.py", line 90, in storageInitialize
    storage.reset()
  File "/tmp/updates/storage/__init__.py", line 265, in reset
    self.devicetree.populate()
  File "/tmp/updates/storage/devicetree.py", line 1486, in populate
    self.addUdevDevice(dev)
  File "/tmp/updates/storage/devicetree.py", line 1176, in addUdevDevice
    self.__passphrase)
  File "/tmp/updates/storage/devicetree.py", line 85, in getLUKSPassphrase
    (passphrase, isglobal) = intf.passphraseEntryWindow(device.name)
AttributeError: InstallInterface instance has no attribute 'passphraseEntryWindow'
install exited abnormally [1/1] 
disabling swap...
unmounting filesystems...
	/mnt/runtime done
	disabling /dev/loop0 LOOP_CLR_FD failed: 16
	/proc done
	/dev/pts done
	/sys done
	/selinux done
sending termination signals...done
sending kill signals...done
you may safely reboot your system

Comment 1 James Laska 2009-03-25 13:47:36 UTC
Changing the installation mode to 'VNC' shows the passphrase prompt, when entering the passphrase, I am able to proceed.

Does this mean that in order to truly clear out a disks contents, I need to blank out more than just the first 512 of the disk?

Comment 2 Chris Lumens 2009-03-25 15:31:59 UTC
What's happening here is that we are probing for storage devices (which prompts for the passphrase) before clearpart getting handled, so there's never any chance to even clear the disk off first.  We need to fix that first.

Second, we need to add passphraseEntryWindow to cmdline.py and have it print an error message and quit.

Comment 3 Chris Lumens 2009-04-23 18:21:20 UTC
This should be fixed in the current build of anaconda, but it's worth a retry.

Comment 4 James Laska 2009-04-23 19:38:25 UTC
Retesting yields the following traceback:

Retrieving install.img...
Running anaconda 11.5.0.47, the Fedora system installer - please wait...
Running pre-install scripts
Finding storage devices...
Can't have a question in command line mode!
Traceback (most recent call last):
  File "/usr/bin/anaconda", line 933, in <module>
    kickstart.fullCommandPass(anaconda, opts.ksfile, earlyKS)
  File "/usr/lib/anaconda/kickstart.py", line 1126, in fullCommandPass
    storage.storageInitialize(anaconda)
  File "/usr/lib/anaconda/storage/__init__.py", line 101, in storageInitialize
    storage.reset()
  File "/usr/lib/anaconda/storage/__init__.py", line 288, in reset
    self.devicetree.populate()
  File "/usr/lib/anaconda/storage/devicetree.py", line 1627, in populate
    self.addUdevDevice(dev)
  File "/usr/lib/anaconda/storage/devicetree.py", line 1167, in addUdevDevice
    self.handleUdevDeviceFormat(info, device)
  File "/usr/lib/anaconda/storage/devicetree.py", line 1491, in handleUdevDeviceFormat
    self.handleUdevLUKSFormat(info, device)
  File "/usr/lib/anaconda/storage/devicetree.py", line 1183, in handleUdevLUKSFormat
    self.__passphrase)
  File "/usr/lib/anaconda/storage/devicetree.py", line 87, in getLUKSPassphrase
    (passphrase, isglobal) = intf.passphraseEntryWindow(device.name)
  File "/usr/lib/anaconda/cmdline.py", line 109, in passphraseEntryWindow
    print("(passphraseEntryWindow: '%s')" % device.path)
AttributeError: 'str' object has no attribute 'path'
install exited abnormally [1/1] 
disabling swap...
unmounting filesystems...
	/mnt/runtime done
	disabling /dev/loop0 LOOP_CLR_FD failed: 16
	/proc done
	/dev/pts done
	/sys done
	/selinux done
sending termination signals...done
sending kill signals...done
you may safely reboot your system

Comment 5 Joel Andres Granados 2009-05-04 14:00:55 UTC
The tracebadk in comment 4 is already addressed.  I see a change from device.path to just device.  This should fix this issue.  Moving to modified.

Comment 6 James Laska 2009-05-07 18:54:07 UTC
I have retested using anaconda-11.5.0.50 and no longer see this problem