%traceback and %onerror support

Róman Joost rjoost at redhat.com
Wed Jun 13 23:23:49 UTC 2018


Hi guys,

I've stumbled over the Anaconda documentation and saw the documented

    %traceback
    http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-8-handling-tracebacks

and

    %onerror
    http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-4-handling-errors

directives.

We want to make Beaker's installation failure detection more
reliable[1].  At the moment we're scraping the console logs for typical
Anaconda errors we know about, but as you can imagine it has it's own
downsides.

I'm wondering with what Fedora/RHEL release these elements were made
available (or are planned to be available). I've seen RHEL 7 documention
which seemed ot indicate %onerror is supported.

I've played around with it during provisioning of a RHEL7 machine, to
include:

%post --erroronfail
#!/bin/bash
return 1
%end

%onerror --log=/dev/console
set -xe
# signal Beaker the installation has failed
fetch - http://beaker-server-lc.beaker:8000/install_failure/32
%end

and I get (anaconda.log):

03:31:58,542 INFO anaconda: Running kickstart %%post script(s)
03:32:47,117 ERR anaconda: Error code 1 running the kickstart script at line 370

which is good, but it seems the %onerror was never executed. Anaconda
version is: anaconda 21.48.22.134-1

Any pointers?

[1] - https://bugzilla.redhat.com/show_bug.cgi?id=1588895
PS: Happy to share more logs/details/whatever is needed.

Kind Regards,
-- 
Róman Joost
Senior Software Engineer, Products & Technologies Operations (Brisbane)
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20180614/b7e6e177/attachment.sig>


More information about the Kickstart-list mailing list