Column rpm_rpmrepository.last_sync_repomd_checksum does not exist

After some foreman component updates (katello-common-3.18.2-1.el7.noarch, python3-pulp-rpm-3.9.0-2.el7.noarch, etc.) I receive the following error in /var/log/messages when trying to sync some specific repos:

django.db.utils.ProgrammingError: column rpm_rpmrepository.last_sync_repomd_checksum does not exist

Expected outcome:

Foreman and Proxy versions:

Foreman and Proxy plugin versions:
Foreman is installed with katello scenario. It has the following plugins:

  • Ansible

  • Dynflow

  • Logs

  • Openscap

  • Pulp

  • Pulpcore

  • Puppet

  • Puppet CA

  • Registration

  • SSH

Distribution and version:
Red Hat Enterprise Linux Server release 7.9 (Maipo)

Other relevant data:
When trying to sync the problematic repos, the sync job would get stuck in pending, and there would be an error like this in /var/log/messages:

 linux-satellite pulpcore-api[15842]: pulp: django.request:ERROR: Internal Server Error: /pulp/api/v3/repositories/rpm/rpm/0dd3dbeb-78bf-48d4-87bc-
 linux-satellite pulpcore-api[15842]: Traceback (most recent call last):
 pulpcore-api[15842]: File "/usr/lib/python3.6/site-packages/django/db/backends/", line 84, in _execute
 pulpcore-api[15842]: return self.cursor.execute(sql, params)
 pulpcore-api[15842]: psycopg2.errors.UndefinedColumn: column rpm_rpmrepository.last_sync_repomd_checksum does not exist

Is there a way to fix this problem, besides deleting and recreating the repos? Thanks!

I have noticed that I can’t sync successfully any repository. I get the same error for each one of them. I think that somehow, something in the database got corrupted. Is there any way to try to repair the database? Thank you!

Hi @Eddd97. Perhaps the Pulp databse wasn’t migrated. Have you upgraded Katello packages, etc without running the foreman-installer?

I have performed just an “yum update” and I have noticed some packets related to katello got updated. I did not run any “foreman-installer” command. Should I ran anything related with database migration? Thanks!

Ok, cool. In that case you should run the foreman-installer once again which will automatically run any necessary upgrade steps for you including migrating of the various databases. Let us know if that works!

1 Like

What options should I use when running foreman-installer? Should I use the same command I’ve used to setup foreman initially? Thanks!


It worked! Now everything seems to be back to normal! Thanks a lot!

1 Like

Had the same problem, solved too… Thank you!