Red Hat Satellite upgrade to 6.17 failed with error "Failed executing foreman-rake upgrade:run, exit status 1"

Solution Verified - Updated -

Issue

  • Red Hat Satellite upgrade to 6.17 failed with error Failed executing foreman-rake upgrade:run, exit status 1

    Execute upgrade:run rake task:                                        [FAIL]
    Failed executing foreman-rake upgrade:run, exit status 1:
    rake aborted!
    ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
    If you are sure you want to continue, run the same command with the environment variable:
    DISABLE_DATABASE_ENVIRONMENT_CHECK=1
    /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/tasks/database_tasks.rb:63:in             check_protected_environments!' /usr/share/gems/gems/activerecord-  6.1.7.8/lib/active_record/railties/databases.rake:18:in block (2 levels) in <top (required)>'
    /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/railties/databases.rake:622:in block (3 levels) in      <top (required)>' /usr/share/gems/gems/rake-13.0.3/exe/rake:27:in <top (required)>'
    Tasks: TOP => db:test:load => db:test:purge => db:check_protected_environments
    (See full trace by running task with --trace)
    

Environment

  • Upgrade from Red Hat Satellite 6.16 to 6.17

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