Upgrade to Red Hat Satellite 6.10 fails with error '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]

Solution Verified - Updated -


  • While upgrading to Red Hat Satellite 6.10, It fails with the following error in satellite.log:

    2022-03-09 09:21:42 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'
    2022-03-09 09:21:42 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:migrate'
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: 'ErbParser' is ignored.
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: 'RubyParser' is ignored.
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: API controllers newer than Api
     pie cache! Run apipie:cache rake task to regenerate cache.
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: rake aborted!
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: StandardError: An error has oc
    curred, this and all later migrations canceled:
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
    2022-03-09 09:22:10 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: PG::ForeignKeyViolation: ERROR:  update or delete 
    on table "katello_repositories" violates foreign key constraint "katello_repository_errata_repo_id_fk" on table "katello_repository_errata"


  • Red Hat Satellite 6.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content