%traceback and %onerror support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux