Bug 1962847

Summary: foreman-rake katello:* fails with the error message The Dynflow world was not initialized yet
Product: Red Hat Satellite Reporter: James Jeffers <jjeffers>
Component: RepositoriesAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: sganar
Severity: high Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, chrobert, pcreech, sganar
Target Milestone: 6.11.0Keywords: Regression, Triaged, Upgrades
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1959901
: 1962851 (view as bug list) Environment:
Last Closed: 2022-07-05 14:28:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Jeffers 2021-05-20 16:43:06 UTC
+++ This bug was initially created as a clone of Bug #1959901 +++

Description of problem:

While running any foreman-rake command under Katello namespace fails with below error message.

{: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"},

Eg:
# foreman-rake katello:check_ping
{:services=>
  {:candlepin=>{:status=>"ok", :duration_ms=>"29"},
   :candlepin_auth=>{:status=>"ok", :duration_ms=>"27"},
   :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=>"ok", :message=>"38 Processed, 0 Failed", :duration_ms=>"0"},
   :candlepin_events=>
    {:status=>"ok", :message=>"71 Processed, 0 Failed", :duration_ms=>"0"},
   :pulp=>{:status=>"ok", :duration_ms=>"82"},
   :pulp_auth=>{:status=>"ok", :duration_ms=>"40"}},
 :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.22/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/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:check_ping
(See full trace by running task with --trace)



Version-Release number of selected component (if applicable):
6.9

How reproducible:

Always
Steps to Reproduce:
1. execute any foreman-rake command with katello namespace.
2.
3.

Actual results:

The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Rails.application.dynflow.require! in some initializer


Expected results:

This should work without error
Additional info:

--- Additional comment from  on 2021-05-12T15:04:30Z 

*** Bug 1959888 has been marked as a duplicate of this bug. ***

--- Additional comment from  on 2021-05-12T15:05:45Z 

*** Bug 1959878 has been marked as a duplicate of this bug. ***

Comment 1 James Jeffers 2021-05-20 16:49:25 UTC
*** Bug 1962851 has been marked as a duplicate of this bug. ***

Comment 4 sganar 2022-04-27 09:39:37 UTC
Verified.

Tested on Satellite 6.11.0 Snap 17

Observation: 
# foreman-rake katello:check_ping

# foreman-rake katello:clean_backend_objects
The following changes will not actually be performed.  Rerun with COMMIT=true to apply the changes
0 orphaned consumer id(s) found in candlepin.
Candlepin orphaned consumers: []

Comment 7 errata-xmlrpc 2022-07-05 14:28:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498