Koji Infrastructure SOP

Contact Information

Owner

Fedora Infrastructure Team

Contact

#fedora-admin, sysadmin-build group

Persons

mbonnet, dgilmore, f13, notting, mmcgrath, SmootherFrOgZ

Servers
  • koji.fedoraproject.org

  • buildsys.fedoraproject.org

  • xenbuilder[1-4]

  • hammer1, ppc[1-4]

Purpose

Build packages for Fedora.

Description

Users submit builds to koji.fedoraproject.org or buildsys.fedoraproject.org. From there it gets passed on to the builders.

Add packages into Buildroot

Some contributors may have the need to build packages against fresh built packages which are not into buildroot yet. Koji has override tags as a Inheritance to the build tag in order to include them into buildroot which can be set by:

koji tag-pkg dist-$release-override <package_nvr>

Troubleshooting and Resolution

kojid won’t start or some builders won’t connect

In the event that some items are able to connect to koji while some are not, please make sure that the database is not filled up on connections. This is common if koji crashes and the db connections aren’t properly cleared. Upon restart many of the connections are full so koji cannot reconnect. Clearing old connections is easy, guess about how long it the new koji has been up and pick a number of minutes larger then that and kill those queries. From db-koji01 as postgres run:

echo "select procpid from pg_stat_activity where usename='koji' and now() - query_start \
>= '00:40:00' order by query_start;" | psql koji | grep "^  " | xargs kill

Disk Space Issues

The builders use a lot of temporary storage. Failed builds and old mock buildroots should be automatic cleaned, but in case it doesn’t, remove /var/lib/mock/* and restart kojid on the affected builder:

systemctl restart kojid

aarch64 buildhw’s have a lot of space taken up in /var/log/libvirt/qemu/nvram/ which can all be deleted to free up space.

Checking builders are all checking in correctly

To check builders, list all builders and grep by the time of last update. If the builders are checking in correctly the time of last update should be close to your current date/time, so use a command like the following example:

koji list-hosts --enabled  | grep -v '04 Dec 2022 12:1'

Kojira process should only run on koji02. Never on koji01.