Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2249970 - The notifications page in Satellite WebUI fails to load with http 500 error
Summary: The notifications page in Satellite WebUI fails to load with http 500 error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Notifications
Version: 6.14.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.15.0
Assignee: Eric Helms
QA Contact: Pavel Novotny
URL:
Whiteboard:
: 2254009 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-16 06:50 UTC by Jayant Bhatia
Modified: 2024-04-23 17:15 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-23 17:15:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36329 0 Normal Closed Cache reads from redis raise "incompatible marshal file format" exception 2023-11-16 15:31:08 UTC
Red Hat Issue Tracker SAT-21331 0 None None None 2023-11-16 06:51:51 UTC
Red Hat Product Errata RHSA-2024:2010 0 None None None 2024-04-23 17:15:47 UTC

Description Jayant Bhatia 2023-11-16 06:50:43 UTC
Description of problem:

The notifications page in Satellite WebUI fails to load with http 500 error. Below error message is observed in /var/log/foreman/production.log:
 Started GET "/notification_recipients" for 10.x.x.x at 2023-01-01 00:00:00 +0100
 [I|app|fee71ac7] Processing by NotificationRecipientsController#index as JSON
 [W|app|fee71ac7] Action failed
 [I|app|fee71ac7] Backtrace for 'Action failed' error (TypeError): incompatible marshal file format (can't be read)
 fee71ac7 |     format version 4.8 required; 123.34 given
 fee71ac7 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/core_ext/marshal.rb:8:in `load'
 fee71ac7 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/core_ext/marshal.rb:8:in `load'
 fee71ac7 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/cache.rb:598:in `deserialize_entry'
 fee71ac7 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/cache/redis_cache_store.rb:459:in `deserialize_entry'
 fee71ac7 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/cache/redis_cache_store.rb:349:in `block in read_entry'
 fee71ac7 | /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/cache/redis_cache_store.rb:478:in `failsafe'


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


Foreman writes notification data to the (redis) cache as raw JSON, but then attempts to read them back using the cache default format (Ruby marshaling). This results in the UI failing to display some notifications, and persistent errors in the log that look like the example shown below. It appears it can be resolved with a one-line fix in the cache_handler to change it to pass the same "raw" parameter for reads as is used for writes:

--- cache_handler.rb 
+++ /usr/share/foreman/app/services/ui_notifications/cache_handler.rb 
@@ -7,7 +7,7 @@

     # JSON Payload
     def payload
-      result = cache.read(cache_key)
+      result = cache.read(cache_key, raw: true)
       if result
         logger.debug("Cache Hit: notification, reading cache for #{cache_key}")
         return result

This has been fixed in upstream: https://projects.theforeman.org/issues/36329

Comment 1 Bryan Kearney 2023-11-16 16:03:03 UTC
Upstream bug assigned to ehelms

Comment 2 Bryan Kearney 2023-11-16 16:03:05 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36329 has been resolved.

Comment 3 Adam Ruzicka 2024-01-16 10:35:19 UTC
*** Bug 2254009 has been marked as a duplicate of this bug. ***

Comment 4 Pavel Novotny 2024-02-07 19:05:57 UTC
Verified in Satellite 6.15 snap 9:
satellite-6.15.0-2.el8sat.noarch
foreman-3.9.1.6-1.el8sat.noarch

Calls from webUI to /notification_recipients are now successful, no errors in Foreman log either:

2024-02-07T14:00:58 [I|app|ec149afe] Started GET "/notification_recipients" for 10.x.x.x at 2024-02-07 14:00:58 -0500
2024-02-07T14:00:58 [I|app|ec149afe] Processing by NotificationRecipientsController#index as JSON
2024-02-07T14:00:58 [I|app|ec149afe] Completed 200 OK in 5ms (Views: 0.1ms | ActiveRecord: 0.6ms | Allocations: 1877)

Comment 7 errata-xmlrpc 2024-04-23 17:15:45 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.15.0 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-2024:2010


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