Bug 2109594 - After upgrading to Satellite 6.11 , foreman log is flooded with huge tracebacks related to "unknown class DockerRegistry, ignoring" and "unknown class Container, ignoring"
Summary: After upgrading to Satellite 6.11 , foreman log is flooded with huge traceba...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.11.0
Hardware: All
OS: All
high
high
Target Milestone: 6.12.0
Assignee: Ian Ballou
QA Contact: sganar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-21 15:03 UTC by Sayan Das
Modified: 2023-03-26 14:05 UTC (History)
6 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35347 0 High Closed After removing the foreman_docker plugin, foreman log is flooded with huge tracebacks related to "unknown class DockerR... 2022-09-29 12:46:27 UTC
Red Hat Issue Tracker SAT-11958 0 None None None 2022-08-22 10:17:40 UTC
Red Hat Issue Tracker SAT-12791 0 None None None 2022-09-21 20:06:29 UTC
Red Hat Knowledge Base (Solution) 6970623 0 None None None 2022-08-03 20:04:11 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:05 UTC

Description Sayan Das 2022-07-21 15:03:56 UTC
Description of problem:

Those who have hit the Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1920810 after upgrading to Satellite 6.11, are also susceptible to the issue where DockerRegistry and Container resource types are not cleared from DB and that raises huge tracebacks, everytime someone tries to edit report templates. 


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

Satellite 6.11 ( RHEL 7 )


How reproducible:

In Customer environment , after upgrading from Satellite 6.10


Steps to Reproduce:

* Upgrade a Satellite 6.9 ( that has DockerRegistry and Container resource types still present ) , to 6.10 and then 6.11

* Go to Monitor --> Report templates and try to edit any report template and the Cancel the same i.e. come back to main page.


Actual results:


2022-07-21T09:30:22 [I|app|e6b226e2] Started GET "/templates/report_templates/468-Ansible%20-%20Ansible%20Inventory/edit" for 10.3.19.126 at 2022-07-21 09:30:22 -0500
2022-07-21T09:30:22 [I|app|e6b226e2] Processing by ReportTemplatesController#edit as HTML
2022-07-21T09:30:22 [I|app|e6b226e2]   Parameters: {"id"=>"468-Ansible - Ansible Inventory"}
2022-07-21T09:30:22 [I|app|e6b226e2]   Rendering report_templates/edit.html.erb within layouts/application
2022-07-21T09:30:22 [I|app|e6b226e2]   Rendered report_templates/_custom_tab_headers.html.erb (Duration: 1.3ms | Allocations: 201)
2022-07-21T09:30:22 [I|app|e6b226e2]   Rendered report_templates/_alerts.html.erb (Duration: 3.8ms | Allocations: 1639)
2022-07-21T09:30:22 [W|app|e6b226e2] unknown class Container, ignoring
2022-07-21T09:30:22 [I|app|e6b226e2] Backtrace for 'unknown class Container, ignoring' error (NameError): uninitialized constant Container
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:282:in `const_get'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:282:in `block in constantize'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:280:in `each'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:280:in `inject'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:280:in `constantize'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'
 e6b226e2 | /usr/share/foreman/app/models/filter.rb:85:in `get_resource_class'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:22:in `block in with_translations'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:22:in `map'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:22:in `with_translations'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:18:in `resources_with_translations'
 e6b226e2 | /usr/share/foreman/app/views/template_inputs/_form.html.erb:8:in `block in _5e3e40319560ac86e152e151988ef286'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.4.7/lib/action_view/helpers/capture_helper.rb:45:in `block in captu
 ..
 ..
2022-07-21T09:30:22 [W|app|e6b226e2] unknown class DockerRegistry, ignoring
2022-07-21T09:30:22 [I|app|e6b226e2] Backtrace for 'unknown class DockerRegistry, ignoring' error (NameError): uninitialized constant DockerRegistry
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:282:in `const_get'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:282:in `block in constantize'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:280:in `each'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:280:in `inject'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/inflector/methods.rb:280:in `constantize'
 e6b226e2 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'
 e6b226e2 | /usr/share/foreman/app/models/filter.rb:85:in `get_resource_class'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:22:in `block in with_translations'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:22:in `map'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:22:in `with_translations'
 e6b226e2 | /usr/share/foreman/app/models/permission.rb:18:in `resources_with_translations'
 e6b226e2 | /usr/share/foreman/app/views/template_inputs/_form.html.erb:8:in `block in _5e3e40319560ac86e152e151988ef286'


I had to shorten the tracebacks but they are frequent and huge 


Expected results:

No such tracebacks


Additional info:


From the customer's satellite:

# echo -e "conf.echo=false \n pp Permission.all" | foreman-rake console 

...
 
 #<Permission:0x0000000015fe65b8
  id: 214,
  name: "view_registries",
  resource_type: "DockerRegistry",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
 #<Permission:0x0000000015fe64f0
  id: 215,
  name: "create_registries",
  resource_type: "DockerRegistry",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
 #<Permission:0x0000000015fe6428
  id: 216,
  name: "destroy_registries",
  resource_type: "DockerRegistry",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
--
 #<Permission:0x000000001335cb50
  id: 299,
  name: "search_repository_image_search",
  resource_type: "DockerRegistry",
  created_at: Thu, 13 Dec 2018 20:01:59 UTC +00:00,
  updated_at: Thu, 13 Dec 2018 20:01:59 UTC +00:00>,

...

 #<Permission:0x0000000015fe70a8
  id: 210,
  name: "view_containers",
  resource_type: "Container",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
 #<Permission:0x0000000015fe6fe0
  id: 211,
  name: "commit_containers",
  resource_type: "Container",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
--
  updated_at: Thu, 02 Jul 2015 21:32:28 UTC +00:00>,
 #<Permission:0x0000000015fe6748
  id: 212,
  name: "create_containers",
  resource_type: "Container",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
 #<Permission:0x0000000015fe6680
  id: 213,
  name: "destroy_containers",
  resource_type: "Container",
  created_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00,
  updated_at: Thu, 01 Oct 2015 21:36:41 UTC +00:00>,
--




I don't see them on a working Satellite 6.11

Comment 11 Ian Ballou 2022-08-08 21:02:29 UTC
Created redmine issue https://projects.theforeman.org/issues/35347 from this bug

Comment 14 Bryan Kearney 2022-09-21 20:04:17 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35347 has been resolved.

Comment 16 sganar 2022-09-28 08:25:13 UTC
Verified.

Tested on Satellite 6.12.0 Snap 12.0

Observation:
I don't see any such tracebacks

Comment 20 errata-xmlrpc 2022-11-16 13:34:44 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.