[Spacewalk-list] Kickstart Exception

James Hogarth james.hogarth at gmail.com
Mon Sep 6 15:27:45 UTC 2010


On 6 September 2010 14:53, James Hogarth <james.hogarth at gmail.com> wrote:
> Hey all,
>
> Hope someone has an idea on this as I'm starting to run out of them to try....
>
> This is from a spacewalk 1.1 server trying to install centos 5 x86_64
> with the updates and extras repos enabled.
>
> At this point I have no user pre/post scripts at all....
> Traceback (most recent call first):
>  File "/tmp/treedir.27146/instimage/usr/lib/anaconda/iutil.py", line
> 45, in execWithRedirect
>    stdout = open(stdout, "w")
>  File "/usr/lib/anaconda/kickstart.py", line 75, in run
>    root = scriptRoot)
>  File "/usr/lib/anaconda/kickstart.py", line 901, in <lambda>
>    map (lambda s: s.run(anaconda.rootPath, serial, anaconda.intf), postScripts)
>  File "/usr/lib/anaconda/kickstart.py", line 901, in postAction
>    map (lambda s: s.run(anaconda.rootPath, serial, anaconda.intf), postScripts)
>  File "/tmp/treedir.27146/instimage/usr/lib/anaconda/packages.py",
> line 44, in doPostAction
>    anaconda.id.instClass.postAction(anaconda, flags.serial)
>  File "/usr/lib/anaconda/dispatch.py", line 204, in moveStep
>    rc = stepFunc(self.anaconda)
>  File "/usr/lib/anaconda/dispatch.py", line 127, in gotoNext
>    self.moveStep()
>  File "/usr/lib/anaconda/text.py", line 727, in run
>    anaconda.dispatch.gotoNext()
>  File "/usr/bin/anaconda", line 974, in ?
>    anaconda.intf.run(anaconda)
> IOError: [Errno 2] No such file or directory:
> '/mnt/sysimage//mnt/sysimage/root/ks-rhn-post.log'
>
> Local variables in innermost frame:
> searchPath: 0
> stdout: /mnt/sysimage//mnt/sysimage/root/ks-rhn-post.log
> stdin: 0
> argv: ['/tmp/ks-script-ugX7Or']
> chroot: <function chroot at 0xdc43f50>
> command: /bin/sh
> stderr: /mnt/sysimage//mnt/sysimage/root/ks-rhn-post.log
> root: /mnt/sysimage
>
> I've got the full anacdump and other logs here is anyone feels able to
> parse through them...
>
> James
>

Okay further to the above....

The generated kickstart file has:

%post --logfile /mnt/sysimage/root/ks-rhn-post.log

This is just prior to the GPG inclusion.

Since this does not have --nochroot it appears that it acts in the
context of the chrooted environment.... anaconda on the outside is
then unable to log to /mnt/sysimage//mnt/sysimage/root/ks-rhn-post.log
for obvious reasons...

Editing my kickstart template in /var/lib/rhn/kickstarts to instead be:
%post --logfile /root/ks-rhn-post.log

allowed the kickstart to complete successfully and the logfile was
indeed in /root/ of the installed system.

I cannot recall what this line looked like in 1.0 but I have confirmed
all my 1.1 kickstarts have the non-chroot path there and 2 other
kickstarts (including a fresh 'create kickstart') have failed.

Digging through my system I cannot locate where the template is (or is
generated) that has this line that gets put into the kickstarts...

Does anyone know so that we can get this fixed?

I couldn't find anything relevant in bugzilla so logged a new case here:
https://bugzilla.redhat.com/show_bug.cgi?id=630666

Regards,

James




More information about the Spacewalk-list mailing list