%traceback and %onerror support

RĂ³man Joost <[email protected]> Thu, 14 Jun 2018 09:23:49 +1000
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <[email protected]>
--===============7343339976363525184==
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="onz7qzaod7sfj4mk"
Content-Disposition: inline


--onz7qzaod7sfj4mk
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=3D/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 lin=
e 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=3D1588895
PS: Happy to share more logs/details/whatever is needed.

Kind Regards,
--=20
R=C3=B3man Joost
Senior Software Engineer, Products & Technologies Operations (Brisbane)
Red Hat

--onz7qzaod7sfj4mk
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEa5l8Rokreli9YqExJonprHo6094FAlshp4UACgkQJonprHo6
095QqRAAnuqKtxh2pC0Hz+Yvu+mZrbLPHu1SGJ5pfQmai4h75QX++WKbhBMsJ0mW
X/ZxOSFZJ4Vbh65aysaG++vy5dvRT6+s81Xe2skxfzrjFsFSnn2DMftheD8jflVd
9wdl0dMK/t1fK5/CNonp4i3etqrjvtktLguR7nbMWfz81bMDnPALHW0LrwDhWVg5
aOkmC5NYpyvNTmtw8Qb5/VHWfZb5eJEg2tk3VBpSi4pf5IGRtpMkdBrgmCZb7U8p
KN280snotns5C8uuUxGgoQ0IJFA6x4FESWbdcBYROQ6mBU1/a0wSG8kTfmncgGzw
RFV5VG5tcwH7NqvVmrbtHgoTb1XT9Ebpr8oZE6lCKiR5DgFiD5AmIdpXmRJB+Ck8
27euWIPksYK1yQ0xWYOkj4x2C7i3yZdlafa2btaIPaApmk2SPxeYLmaFZyNmqOdc
aOHr1skUJ2IjfFYZHlrUUpytlUPTDNMTl/blx3ZAeOtfL9GddmZ0evlVanheeHIu
IyDXYQxStr6MyiZ6N6cb79S89E4i6NS1ryC2AMuzyoFGowQH/ssT+N85jgp1Y3AS
LIjerF4lKple7o1MjRhuaCmXDDnUDkQ9p0lGrKh+YCWVZHydhT4O38uzW1lLADtS
9RUWZXwX5SvP7k2itF9/q31R70rHU2c4UR+1+J/5M0aimHQBOB4=
=d7UV
-----END PGP SIGNATURE-----

--onz7qzaod7sfj4mk--


--===============7343339976363525184==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kickstart-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kickstart-list
--===============7343339976363525184==--