Project

General

Profile

Actions

Bug #35347

closed

After removing the foreman_docker plugin, foreman log is flooded with huge tracebacks related to "unknown class DockerRegistry, ignoring" and "unknown class Container, ignoring"

Added by Ian Ballou about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
DB migrations
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2109594

Description of problem:

Errors about missing DockerRegistry and Container types fill the logs.

The foreman_docker plugin was shipped with a cleanup script, but it seems that it was skipped in some environments. Now, since the plugin is old and archived, we need a new migration to clean up what remains.

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

Seems Foreman 3.1+

How reproducible:

Depends on if the foreman_docker plugin was used.

Steps to Reproduce:

Create a Foreman install with the foreman_docker plugin and upgrade up to Foreman 3.1.

  • 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:

  1. 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>,
--

Related issues 3 (0 open3 closed)

Related to Foreman - Bug #32116: Remove Trends and Statistics data from all instancesClosedActions
Related to Packaging - Bug #35538: Obsolete foreman_dockerClosedEwoud Kohl van WijngaardenActions
Related to Foreman - Bug #35871: Statistics migrations are purged even if foreman_statistics is presentClosedOndřej EzrActions
Actions #1

Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9343 added
Actions #2

Updated by The Foreman Bot about 2 years ago

  • Fixed in Releases 3.5.0 added
Actions #3

Updated by Anonymous about 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Ondřej Ezr about 2 years ago

  • Related to Bug #32116: Remove Trends and Statistics data from all instances added
Actions #5

Updated by Evgeni Golov almost 2 years ago

  • Related to Bug #35538: Obsolete foreman_docker added
Actions #6

Updated by Ewoud Kohl van Wijngaarden almost 2 years ago

  • Subject changed from After removing the foreman_docker plugin, foreman log is flooded with huge tracebacks related to "unknown class DockerRegistry, ignoring" and "unknown class Container, ignoring" to After removing the foreman_docker plugin, foreman log is flooded with huge tracebacks related to "unknown class DockerRegistry, ignoring" and "unknown class Container, ignoring"
  • Category set to DB migrations
  • Triaged changed from No to Yes
Actions #7

Updated by Ewoud Kohl van Wijngaarden almost 2 years ago

  • Related to Bug #35871: Statistics migrations are purged even if foreman_statistics is present added
Actions #8

Updated by The Foreman Bot almost 2 years ago

  • Pull request https://github.com/theforeman/foreman-documentation/pull/1883 added
Actions

Also available in: Atom PDF