Bug 786505

Summary: KeyError: '_invalid_' if using kickstart with "autostep"
Product: [Fedora] Fedora Reporter: Hank Wilde <hwilde>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: akozumpl, anaconda-maint-list, g.kaviyarasu, jonathan, razi.khaja, vanmeeuwen+fedora, wendellcraigbaker, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:d17b7def9b028d91f1c3d9cdf44f88aabea74412ef6a5a5c0a7ea6e0a2f08c0b
Fixed In Version: anaconda-18.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-03 19:36:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: anaconda-tb-IHBREF none

Description Hank Wilde 2012-02-01 16:05:12 UTC
libreport version: 2.0.6
executable:     /usr/bin/python
hashmarkername: anaconda
kernel:         3.1.0-7.fc16.x86_64
product:        Fedora
reason:         KeyError: '_invalid_'
time:           Wed Feb  1 07:04:16 2012
version:        16

anaconda-tb-IHBREF: Binary file, 589130 bytes

description:
:The following was filed automatically by anaconda:
:anaconda 16.25 exception report
:Traceback (most recent call first):
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/indexed_dict.py", line 36, in __getitem__
:    return super(IndexedDict, self).__getitem__(key)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 229, in <lambda>
:    changes = map(lambda s: self.steps[s].done(self._current_step()), steps)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 229, in done_steps
:    changes = map(lambda s: self.steps[s].done(self._current_step()), steps)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 357, in dispatch
:    self.done_steps(self.step)
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 241, in go_forward
:    self.dispatch()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1201, in nextClicked
:    self.anaconda.dispatch.go_forward()
:  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1228, in handleRenderCallback
:    self.nextClicked()
:KeyError: '_invalid_'

Comment 1 Hank Wilde 2012-02-01 16:05:18 UTC
Created attachment 558865 [details]
File: anaconda-tb-IHBREF

Comment 2 Hank Wilde 2012-02-01 19:41:20 UTC
Trying to make an unattended headless USB installer.  Steps to reproduce:

1.  Run the pungi Gather, Create and Build steps

  pungi -GCB --ver 16 --force --isfinal -c ks.cfg

2. Convert the kickstart script to cpio

  find -name ks.cfg  | cpio -o -c > ks.cpio

3.  Append the kickstart script to initrd.img    (to get around https://bugzilla.redhat.com/show_bug.cgi?id=452865)

 cat ks.cpio >> 16/x86_64/os/isolinux/initrd.img

4.  Copy over the isolinux config to append ks=file:/ks.cfg

 cp fc16_isolinux.cfg 16/x86_64/os/isolinux/isolinux.cfg 

5.  Run the pungi Iso step

 pungi -I --ver 16 --force --isfinal -c ks.cfg

6.  Copy iso to disk

 livecd-iso-to-disk --resetmbr --format Fedora-16-x86_64-DVD.iso /dev/sdd1

Comment 3 Hank Wilde 2012-02-01 19:44:58 UTC
Got same results using the standard Fedora-16 .iso and this procedure:

1. livecd-iso-to-disk --resetmbr Fedora-16-x86_64-DVD.iso /dev/sdd1

2. Copy ks.cfg to the root of the USB stick

3. Edit syslinux/syslinux.cfg and append the kickstart 

append initrd=initrd.img LANG=en_US.UTF-8 repo=hd:UUID=07822a02-a09d-40ea-9059-e87dfacdfd9c:/  ks=hd:UUID=07822a02-a09d-40ea-9059-e87dfacdfd9c:/ks.cfg

Same exact results, key: _invalid_.  Bug reporter noted as duplicate.

Comment 4 Will Woods 2012-02-01 19:52:40 UTC
One interesting thing from the kickstart: 'autostep'.

The 'autostep' command isn't really needed normally - kickstart installs proceed automatically if you've filled in all the required info.

(We mostly use it for debugging and automatically gathering screenshots of the installer.)

Maybe it's messing with the new dispatcher code in an unexpected way?

Comment 5 Hank Wilde 2012-02-01 21:01:43 UTC
Removing the 'autostep' command from kickstart allows the install to finish normally without error

Comment 6 Will Woods 2012-02-01 21:14:26 UTC
Good to know; thanks for testing that.

Comment 7 Ales Kozumplik 2012-02-02 10:21:19 UTC
Ah, that explains it quite clearly: with autostep, handleRenderCallback() simulates advancing to the next screen as soon as the current screen is displayed. It doesn't check what step we're on, whether "Next" or "Close" or "Reboot" are visible or even whether we're on the last dispatcher step.

So this assert really catches a rotten case.

Comment 8 Chris Lumens 2012-02-02 15:06:06 UTC
Unless this is easily fixed, I don't see all that much point in spending much time on it.  All this dispatcher stuff is changing for F18 with the UI rework, and who knows what's going to happen with autostep.

Comment 9 Chris Lumens 2012-08-03 19:36:00 UTC
The code this bug resulted from is no longer present as of anaconda-18.3.  Please test with F18 and if you see similar problems, open a new bug.  Thanks.