Description of problem: Beaker detects errors by scraping the log files and searching for anaconda error patterns. While this is useful if we know certain patterns, it can be unreliable if errors don't follow this pattern and the job is then finally killed by the watchdog. This bug is to find ways to make the error detection more reliable. Version-Release number of selected component (if applicable): 25
I've found: %traceback and %onerror in the latest pyanaconda documentation, yet it seems to be a new feature which doesn't seem to be available with Fedora28. RHEL 7 seems to be shipping[1] with this feature, but my attempts to reproduce it failed so far. [1] - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax#sect-kickstart-onerror
My attempts so far was using a hacked up proxy which accepts an additional endpoint and the job is created with a ks_appends: <ks_appends> <ks_append><![CDATA[ %post --erroronfail #!/bin/bash return 1 %end %onerror --log=/dev/console set -xe fetch - http://beaker-server-lc.beaker:8000/install_failure/32 %end ]]></ks_append> </ks_appends> in which it simply does a curl request to the end point. Yet it was never called, even tho anaconda errored: ================================================================================ ================================================================================ Error There was an error running the kickstart script at line 370. This is a fatal error and installation will be aborted. The details of this error are: /tmp/ks-script-3K8nSz: line 2: return: can only `return' from a function or sourced script Press enter to exit.