Upgrading Red Hat Satellite server to 6.9 or above fails at db:seed stage with error "Validation failed: Remote execution features is invalid"
Issue
-
While upgrading to Red Hat Satellite 6.9 or above, in some scenarios, the upgrade fails with the following error:
[ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0] [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: '/usr/sbin/foreman-rake db:seed' returned 1 instead of one of [0]
-
Running the
db:seed
command manually results in the following error:# foreman-rake db:seed --trace --verbose ** Invoke db:seed (first_time) ** Invoke db:load_config (first_time) ** Invoke environment (first_time) ** Execute environment API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache. ** Execute db:load_config ** Execute db:seed ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke db:load_config ** Execute db:abort_if_pending_migrations ** Invoke dynflow:abort_if_pending_migrations (first_time) ** Invoke environment ** Execute dynflow:abort_if_pending_migrations User with login admin already exists, not seeding as admin. rake aborted! ActiveRecord::RecordInvalid: Validation failed: Remote execution features is invalid /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:80:in `raise_validation_error' /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:53:in `save!' .. .. /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.4/lib/active_record/suppressor.rb:48:in `save!' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-4.2.3.1/app/models/job_template.rb:68:in `import_raw!' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_rh_cloud-3.0.26/db/seeds.d/50_job_templates.rb:6:in `block (3 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_rh_cloud-3.0.26/db/seeds.d/50_job_templates.rb:5:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_rh_cloud-3.0.26/db/seeds.d/50_job_templates.rb:5:in `block (2 levels) in <top (required)>' /opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/auditor.rb:376:in `without_auditing'
Environment
- Red Hat Satellite 6.9 & 6.10
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.