Bug 1861815 - Error only on production builds: The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Rails.application.dynflow.require! in some initializer
Summary: Error only on production builds: The Dynflow world was not initialized yet. I...
Keywords:
Status: CLOSED DUPLICATE of bug 1861816
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-29 16:01 UTC by Jeremy Lenz
Modified: 2020-07-30 14:26 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-30 14:26:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30511 0 High Closed Error only on production builds: The Dynflow world was not initialized yet. If your plugin uses it, make sure to call Ra... 2021-01-06 02:35:34 UTC

Description Jeremy Lenz 2020-07-29 16:01:24 UTC
When running a rake task that includes the Katello::SubscriptionMailer, it fails with error:

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

Only seems to happen on nightly; not on devel boxes.

Steps to reproduce

# Import a manifest with at least one subscription that expires <180 days
# Attach that subscription to a host
# Run the Subscriptions - Entitlement Report (Monitor -> Report Templates) with Days from Now set appropriately
# Verify that the report shows that host and subscription
# In My Account -> Email Preferences, set up the Subscriptions Expiring Soon email and configure for Daily emails
# Run /usr/sbin/foreman-rake reports:daily

Expected: no output; if email is set up you are emailed the report
Actual: the error above

Alternate steps to reproduce (doesn't require a host/subscription)

In foreman-rake console, run

 include Katello::SubscriptionMailerHelper
 start_report_task(120)


Expected: return the job ID as a string
Actual: the error above

Workaround

See workaround in https://projects.theforeman.org/issues/29337#note-2

Comment 1 Jeremy Lenz 2020-07-29 16:01:27 UTC
Created from redmine issue https://projects.theforeman.org/issues/30511

Comment 2 Brad Buckingham 2020-07-30 14:26:18 UTC

*** This bug has been marked as a duplicate of bug 1861816 ***


Note You need to log in before you can comment on or make changes to this bug.