Bug 2116123 - Even though the CreateRssNotifications job gets completed, It fails to fetch RSS with error '(NameError): uninitialized constant Foreman::HttpProxy::NetHttpExt' in Satellite 6.12
Summary: Even though the CreateRssNotifications job gets completed, It fails to fetch ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Notifications
Version: 6.12.0
Hardware: All
OS: All
medium
medium
Target Milestone: 6.12.0
Assignee: Nobody
QA Contact: Ladislav Vasina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-07 09:53 UTC by Sayan Das
Modified: 2022-11-16 13:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-12709 0 None None None 2022-09-05 08:34:47 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:22 UTC

Description Sayan Das 2022-08-07 09:53:39 UTC
Description of problem:

Even though the CreateRssNotifications job gets completed, It fails to fetch RSS with error 'Fetching RSS failed' error (NameError): uninitialized constant Foreman::HttpProxy::NetHttpExt in Satellite 6.12


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

Satellite 6.12 [ snap 5 ]


How reproducible:

Always

Steps to Reproduce:
1. Install a Satellite 6.12 
2. Monitor /var/log/foreman/production.log while doing so
3. At the end of the installation process, the CreateRssNotifications job gets executed once and then gets scheduled for further execution as well.

Actual results:

2022-08-07T11:28:56 [I|dyn|] Performing validity checks
2022-08-07T11:28:56 [I|app|] Performing StoredValuesCleanupJob (Job ID: 54395180-0f63-4c5b-8907-02c667b01975) from Dynflow(default) enqueued at 2022-08-07T05:58:26Z
2022-08-07T11:28:56 [I|app|] Performing SendExpireSoonNotifications (Job ID: c024de14-bde7-4d8a-9ba8-746b95b16eab) from Dynflow(default) enqueued at 2022-08-07T05:58:26Z
2022-08-07T11:28:56 [I|app|] Performing CreateRssNotifications (Job ID: abe52057-ce75-4d67-b703-f6e54a3aca14) from Dynflow(default) enqueued at 2022-08-07T05:58:26Z
2022-08-07T11:28:56 [W|not|] Fetching RSS failed
2022-08-07T11:28:56 [I|not|] Backtrace for 'Fetching RSS failed' error (NameError): uninitialized constant Foreman::HttpProxy::NetHttpExt
 | Did you mean?  Foreman::HttpProxy::NetHttpExtension
 | /usr/share/foreman/app/services/ui_notifications/rss_notifications_checker.rb:83:in `load_rss_feed'
 | /usr/share/foreman/app/services/ui_notifications/rss_notifications_checker.rb:44:in `deliver!'
 | /usr/share/foreman/app/jobs/create_rss_notifications.rb:7:in `perform'
 | /usr/share/gems/gems/activejob-6.0.4.7/lib/active_job/execution.rb:40:in `block in perform_now'
 | /usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
 | /usr/share/gems/gems/i18n-1.8.2/lib/i18n.rb:313:in `with_locale'
 | /usr/share/gems/gems/activejob-6.0.4.7/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
 | /usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:121:in `instance_exec'
 | /usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
 | /usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
 | /usr/share/gems/gems/activejob-6.0.4.7/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
..
..
 | /usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2022-08-07T11:28:56 [I|app|] Performing CreateExpiredManifestNotifications (Job ID: 736d2db7-fbba-49f9-a308-7907411b922f) from Dynflow(default) enqueued at 2022-08-07T05:58:26Z
2022-08-07T11:28:56 [I|dyn|] Finished performing validity checks
2022-08-07T11:28:56 [I|app|] Performing CreatePulpDiskSpaceNotifications (Job ID: 05758336-361b-407d-9831-25c3e0dd264a) from Dynflow(default) enqueued at 2022-08-07T05:58:26Z
2022-08-07T11:28:56 [I|app|] Enqueued SendExpireSoonNotifications (Job ID: 2eefabce-cc47-4afb-a723-cd5ef7d2f6e1) to Dynflow(default) at 2022-08-07 17:58:56 UTC
2022-08-07T11:28:56 [I|app|] Performed SendExpireSoonNotifications (Job ID: c024de14-bde7-4d8a-9ba8-746b95b16eab) from Dynflow(default) in 253.21ms
2022-08-07T11:28:56 [I|app|] Enqueued CreateRssNotifications (Job ID: 08e7b20d-99da-4a86-9355-32f45b4bde04) to Dynflow(default) at 2022-08-07 17:58:56 UTC with arguments: {}
2022-08-07T11:28:56 [I|app|] ForemanWebhooks::EventSubscriber: create_rss_notifications_performed.event.foreman event received
2022-08-07T11:28:56 [I|app|] Enqueued StoredValuesCleanupJob (Job ID: 85aec629-1c16-4d01-9dcd-00379c71b1db) to Dynflow(default) at 2022-08-07 17:58:56 UTC with arguments: {}
2022-08-07T11:28:56 [I|app|] ForemanWebhooks::EventSubscriber: stored_values_cleanup_performed.event.foreman event received
2022-08-07T11:28:56 [I|app|] Performed StoredValuesCleanupJob (Job ID: 54395180-0f63-4c5b-8907-02c667b01975) from Dynflow(default) in 305.07ms
2022-08-07T11:28:56 [I|app|] Enqueued CreatePulpDiskSpaceNotifications (Job ID: 7c354ebd-5d81-4861-b054-909e2366fc2e) to Dynflow(default) at 2022-08-07 17:58:56 UTC
2022-08-07T11:28:56 [I|app|] Performed CreatePulpDiskSpaceNotifications (Job ID: 05758336-361b-407d-9831-25c3e0dd264a) from Dynflow(default) in 148.01ms
2022-08-07T11:28:56 [I|app|] Performed CreateRssNotifications (Job ID: abe52057-ce75-4d67-b703-f6e54a3aca14) from Dynflow(default) in 277.99ms


Expected results:

No such tracebacks. 


Additional info:


Judging by https://github.com/theforeman/foreman/blob/3.3-stable/lib/foreman/http_proxy/net_http_extension.rb , i guess the suggestion from the Traceback is correct.

Here in https://github.com/theforeman/foreman/blob/develop/app/services/ui_notifications/rss_notifications_checker.rb#L83 ,

      ::Foreman::HttpProxy::NetHttpExt.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

perhaps should be

      ::Foreman::HttpProxy::NetHttpExtension.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|

Comment 2 Adam Ruzicka 2022-09-05 08:22:18 UTC
Looks like the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1892752 was not cherry-picked properly (the fix itself was, but not its dependencies). ::Foreman::HttpProxy::NetHttpExt was introduced with this https://bugzilla.redhat.com/show_bug.cgi?id=1984400, which in upstream was merged earlier, but in downstream landed in snap 6. This should be already fixed in current snap, moving to ON_QA.

Comment 3 Ladislav Vasina 2022-09-14 16:17:34 UTC
VERIFIED
I have tried installing the new Satellite 6.12(satellite-6.12.0-2.el8sat.noarch) on Rhel8.6
and during the installation, there were no tracebacks stated in Comment0.
See output from /var/log/foreman/production.log below:

2022-09-14T03:03:12 [I|dyn|] Performing validity checks
2022-09-14T03:03:12 [I|app|] Performing CreateRssNotifications (Job ID: ae44253e-8a03-48c2-ae4c-91a0137fed40) from Dynflow(default) enqueued at 2022-09-14T07:02:02Z
2022-09-14T03:03:12 [I|app|] Performing StoredValuesCleanupJob (Job ID: 4a191fe6-d96f-4f8b-937e-596e47907df7) from Dynflow(default) enqueued at 2022-09-14T07:02:02Z
2022-09-14T03:03:12 [I|app|] Performing CreatePulpDiskSpaceNotifications (Job ID: bcd3d2b1-51a6-4d1f-9779-c4c9f72d51da) from Dynflow(default) enqueued at 2022-09-14T        07:02:02Z
2022-09-14T03:03:12 [I|app|] Performing CreateExpiredManifestNotifications (Job ID: 17adcd2e-40ad-4691-9824-324504a79f8f) from Dynflow(default) enqueued at 2022-09-1        4T07:02:02Z
2022-09-14T03:03:12 [I|app|] Performing SendExpireSoonNotifications (Job ID: 071b6ca7-c421-471a-9d63-51b210791443) from Dynflow(default) enqueued at 2022-09-14T07:02        :02Z
2022-09-14T03:03:12 [I|dyn|] Finished performing validity checks
2022-09-14T03:03:12 [I|app|] Enqueued CreatePulpDiskSpaceNotifications (Job ID: 46754fd4-86c7-43d7-95a5-ef5523c4f87d) to Dynflow(default) at 2022-09-14 19:03:12 UTC
2022-09-14T03:03:12 [I|app|] Performed CreatePulpDiskSpaceNotifications (Job ID: bcd3d2b1-51a6-4d1f-9779-c4c9f72d51da) from Dynflow(default) in 171.22ms
2022-09-14T03:03:12 [I|app|] Enqueued StoredValuesCleanupJob (Job ID: 1aa0201b-06ce-4e44-b971-2aeed464091e) to Dynflow(default) at 2022-09-14 19:03:12 UTC with argum        ents: {}
2022-09-14T03:03:12 [I|app|] ForemanWebhooks::EventSubscriber: stored_values_cleanup_performed.event.foreman event received
2022-09-14T03:03:12 [I|app|] Performed StoredValuesCleanupJob (Job ID: 4a191fe6-d96f-4f8b-937e-596e47907df7) from Dynflow(default) in 180.23ms
2022-09-14T03:03:12 [I|app|] Enqueued SendExpireSoonNotifications (Job ID: 160f2767-bf55-446e-9518-7e9283fc24bf) to Dynflow(default) at 2022-09-14 19:03:12 UTC
2022-09-14T03:03:12 [I|app|] Performed SendExpireSoonNotifications (Job ID: 071b6ca7-c421-471a-9d63-51b210791443) from Dynflow(default) in 160.22ms
2022-09-14T03:03:12 [I|app|] Enqueued CreateRssNotifications (Job ID: 11bf80a5-5cc8-42ef-aacc-dd10775d49ba) to Dynflow(default) at 2022-09-14 19:03:12 UTC with argum        ents: {}
2022-09-14T03:03:12 [I|app|] ForemanWebhooks::EventSubscriber: create_rss_notifications_performed.event.foreman event received
2022-09-14T03:03:12 [I|app|] Performed CreateRssNotifications (Job ID: ae44253e-8a03-48c2-ae4c-91a0137fed40) from Dynflow(default) in 312.07ms

Comment 7 errata-xmlrpc 2022-11-16 13:35:13 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 (Important: Satellite 6.12 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:8506


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