Problem:
After updating to Foreman 2.3.2 and Katello 3.18 I had to restore our puppet.conf because the update process reset it. We use custom path for our environment because we manage our puppet code with git. I reconfigure it but when i try to import classes from my server in the web ui I get an error message: Oops something goes wrong unnumbered(1) mixed with named
when I execute the suggested command from the error page foreman-rake errors:fetch_log request_id=46399b8c --trace
I’m also getting an error:
Looks like there is a bug in the errors:fetch_log task when the layout of the log isn’t set to multiline_request_pattern that is preventing you from seeing the actual error. Please search /var/log/foreman/production.log for request 46399b8c and look for the full stack trace there. I will open an issue to correct the rake task.
You should also change the logging layout to multiline_request_pattern so the stack trace is also prefixed with the request id (as you can see, the grep you posted does not include the actual back track for the error, which you can find by manually viewing the log file right after the Backtrace for... line)
If you are using the installer, you can use the --foreman-logging-layout option to configure it. If not, it should be defined in /etc/foreman/logging.yaml. once you modify it you’ll need to restart foreman for the change to take affect.
Indeed, but run foreman-installer --foreman-logging-layout didn’t update this setting.
I noticed this error during foreman-installer was running:
Upgrade Step 2/3: katello:correct_puppet_environments. This may take a long while.
Processing Puppet Environment 1/9: 1-Affichage_Centos_8-v1_0-puppet-a7d90fab-abf5-4b2e-be06-38fd4528a0a0 (1)
Content View Puppet Environment 1 Missing, Creating.
Failed upgrade task: katello:correct_puppet_environments, see logs for more information.
I’m afraid there isn’t enough context to make a determination. The name of that repo is valid because a copy is created from Library with the name of the CV within its own name. Can you run foreman-rake katello:correct_puppet_environments and share the stack trace?
Unfortunately no. It’s even worst… Here the result after changing accordingly to my conf:
(/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1/lib/katello/tasks/pulp3_content_switchover.rake)
and restarted the services with hammer service restart
\# foreman-rake katello:correct_puppet_environments --trace
** Invoke katello:correct_puppet_environments (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke katello:check_ping (first_time)
** Invoke environment
** Execute katello:check_ping
{:services=>
{:candlepin=>{:status=>"ok", :duration_ms=>"462"},
:candlepin_auth=>{:status=>"ok", :duration_ms=>"70"},
:foreman_tasks=>
{:status=>"FAIL",
:message=>
"The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Rails.application.dynflow.require! in some initializer"},
:katello_events=>
{:status=>"FAIL", :message=>"Not running", :duration_ms=>"1"},
:candlepin_events=>
{:status=>"ok", :message=>"27 Processed, 0 Failed", :duration_ms=>"0"},
:pulp3=>{:status=>"ok", :duration_ms=>"338"},
:pulp=>{:status=>"ok", :duration_ms=>"129"},
:pulp_auth=>{:status=>"ok", :duration_ms=>"57"}},
:status=>"FAIL"}
rake aborted!
Not all the services have been started. Check the status report above and try again.
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1/lib/katello/tasks/reimport.rake:10:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:217:in `block in invoke_prerequisites'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:215:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:215:in `invoke_prerequisites'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in `load'
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in `<main>'
Tasks: TOP => katello:correct_puppet_environments => katello:check_ping