FAF in container

Posted by marusak on September 20, 2017

FAF is a framework for aggregating and analyzing reports of crashes and has never been easier to deploy it.

Why deploying own FAF

Firstly, standard users probably do not want to deploy own FAF - FAF is here to collect an enormous amount of crashes from lots of users. Deploying own FAF might be interesting for SysAdmins who control hundreds of machines. It also may be quite interesting on container platform such as OpenShift.

Watch this demo how to deploy and report into FAF quickly.

FAF in container

Quickstart

We advise using official faf-image.

docker run --name faf -dit abrt/faf-image:1.2.0

However you also probably want to mount volumes to /var/lib/postgres and to /var/spool/faf to have a persistent database and FAF’s data.

docker run --name faf -v /var/lib/faf-docker/faf:/var/spool/faf \
 -v /var/lib/faf-docker/postgres:/var/lib/postgres/ -dit abrt/faf-image:1.2.0

If you run FAF for the first time, then there is no database. You have to initialize it.

docker exec faf init_db

Then FAF is ready for use.

Reporting into deployed FAF

You can see incoming reports in web UI. It is accessible on http://<container_IP>/faf.

Finding out container IP address:


docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' faf

Also to send reports into your own FAF, you have to set up libreport on all machines, from with you wish to report into your own FAF. To do so, open a file /etc/libreport/plugins/ureport.conf and enter here:

URL = http://<container_IP>/faf

For servers, you may want to enable automatic reporting. Those reports are called μReports. Run:

abrt-auto-reporting yes

Supported operating systems

This image is ready to accept reports from all active releases of Fedora.

To add a new version of the already supported system you run:

docker exec -u faf faf faf releaseadd -o OPSYS --opsys-release RELEASE

E.g., To add Fedora 99 you run:

docker exec -u faf faf faf releaseadd -o fedora --opsys-release 99

You can even write a plugin for own OS. Once you wrote this plugin and installed it, you can enable it using:

docker exec -u faf faf faf opsysadd OPSYS

Less informative reports

A problem that happened in C/C++ code comes to FAF in the form of build_id and offset. However, for users, it is much more suitable to have file name and line. For better understanding, please see following two images, both describing the same report.

Only with build_id and offset: without With filename and line number: with

The process of transforming build ids and offsets to file names and lines we call retracing. To be able to do that, we need packages, from which these crashes come.

For retrace.fedoraproject.org we have all Fedora packages stored locally. It consumes several TB of storage. This Docker image does not download any packages and therefore does not retrace any symbols. Note that this only affects compiled code, so for example, python unhandled exceptions are not affected.