Bodhi Infrastructure Releng SOP

Bodhi is used by Fedora developers to submit potential package updates for releases and to manage buildroot overrides. From here, bodhi handles all of the dirty work, from sending around emails, dealing with Koji, to composing the repositories.

Bodhi production instance:

Contact Information


Fedora Infrastructure Team





  • (composer)

  • (web front end and backend task workers for non-compose tasks)

  • (staging composer)

  • (staging web front end and backend task workers for non-compose tasks)


Push package updates, and handle new submissions.

Configuring all bodhi nodes

Run this command from the ansible checkout to configure all of bodhi in production:

# This will configure the backends
$ sudo rbac-playbook playbooks/groups/bodhi2.yml
# This will configure the frontend
$ sudo rbac-playbook openshift-apps/bodhi.yml

Pushing updates

SSH into the bodhi-backend01 machine and run:

$ sudo -u apache bodhi-push

You can restrict the updates by release and/or request:

$ sudo -u apache bodhi-push --releases f23,f22 --request stable

You can also push specific builds:

$ sudo -u apache bodhi-push --builds openssl-1.0.1k-14.fc22,openssl-1.0.1k-14.fc23

This will display a list of updates that are ready to be pushed.

Monitoring the bodhi composer output

You can monitor the bodhi composer via the bodhi CLI tool, or via the systemd journal on bodhi-backend01:

# From the comfort of your own laptop.
$ bodhi composes list
# From bodhi-backend01
$ journalctl -f -u bodhi-celery

Resuming a failed push

If a push fails for some reason, you can easily resume it on bodhi-backend01 by running:

$ sudo -u apache bodhi-push --resume

Adding notices to the front page or new update form

You can easily add notification messages to the front page of bodhi using the frontpage_notice option in ansible/roles/bodhi2/base/templates/production.ini.j2. If you want to flash a message on the New Update Form, you can use the newupdate_notice variable instead. This can be useful for announcing things like service outages, etc.

Using the Bodhi Shell to modify updates by hand

The "bodhi shell" is a Python shell with the SQLAlchemy session and transaction manager initialized. It can be run from any production/staging backend instance and allows you to modify any models by hand.

sudo pshell /etc/bodhi/production.ini

# Execute a script that sets up the `db` and provides a `delete_update` function.
# This will eventually be shipped in the bodhi package, but can also be found here.
>>> execfile('')

At this point you have access to a db SQLAlchemy Session instance, a t transaction module, and m for the bodhi.models.

# Fetch an update, and tweak it as necessary.
>>> up = m.Update.get(u'u'FEDORA-2016-4d226a5f7e', db)

# Commit the transaction
>>> t.commit()

Here is an example of merging two updates together and deleting the original.

>>> up = m.Update.get(u'FEDORA-2016-4d226a5f7e', db)
>>> up.builds
[<Build {'epoch': 0, 'nvr': u'resteasy-3.0.17-2.fc24'}>, <Build {'epoch': 0, 'nvr': u'pki-core-10.3.5-1.fc24'}>]
>>> b = up.builds[0]
>>> up2 = m.Update.get(u'FEDORA-2016-5f63a874ca', db)
>>> up2.builds
[<Build {'epoch': 0, 'nvr': u'resteasy-3.0.17-3.fc24'}>]
>>> up.builds.remove(b)
>>> up.builds.append(up2.builds[0])
>>> delete_update(up2)
>>> t.commit()