Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-26175

[Sat6.15/SCAP/Bug] Host details page with disabled foreman-scap plugin triggers backtrace

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • 0
    • No

      Description of problem:

      1. Enable scap plugin
         satellite-installer --enable-foreman-proxy-plugin-openscap --enable-foreman-plugin-openscap

       As this is enabled default in satellite

      2. Check in UI that Hosts-Compliance-SCAP Content and Hosts-Edit-OpenSCAP Capsule-field exists

      Hosts-Compliance-SCAP Content : Sat UI >> Hosts >> Scap content >> On this page content is present.

      Hosts-Edit-OpenSCAP Capsule-field : Sat UI >> Hosts >> All hosts >> Edit >> Openscap capsule >>

      3. Disable scap plugin
          satellite-installer --no-enable-foreman-proxy-plugin-openscap --no-enable-foreman-plugin-openscap

      4. Verify in installer that the openscap proxy is really going to be disabled
          satellite-installer --help | grep scap
          Output shall include the followjng 2 lines with 'default: false'
          #--[no-]enable-foreman-plugin-openscap Enable 'foreman_plugin_openscap' puppet module (default: false)
          #--[no-]enable-foreman-proxy-plugin-openscap Enable 'foreman_proxy_plugin_openscap' puppet module (default: false)

      Version-Release number of selected component (if applicable):
      6.15
      Post disable the plugin:-
      When i now go to the hosts details page i noticed in the log files a warning with a long backtrace

      ~~~
      2024-06-05T10:03:21 [W|app|371ed960] unknown class ForemanOpenscap::Policy, ignoring
      2024-06-05T10:03:21 [I|app|371ed960] Backtrace for 'unknown class ForemanOpenscap::Policy, ignoring' error (NameError): uninitialized constant ForemanOpenscap
       371ed960 | Did you mean?  ForemanLeapp
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:285:in `const_get'
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:285:in `block in constantize'
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:283:in `each'
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:283:in `inject'
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/inflector/methods.rb:283:in `constantize'
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
       371ed960 | /usr/share/foreman/app/models/filter.rb:86:in `get_resource_class'
       371ed960 | /usr/share/foreman/app/models/permission.rb:23:in `block in with_translations'
       371ed960 | /usr/share/foreman/app/models/permission.rb:23:in `map'
       371ed960 | /usr/share/foreman/app/models/permission.rb:23:in `with_translations'
       371ed960 | /usr/share/foreman/app/models/permission.rb:19:in `resources_with_translations'
       371ed960 | /usr/share/foreman/app/views/template_inputs/_form.html.erb:8:in `block in _cc6fa2aca2beb50ad0d8b478e8910c35'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/helpers/capture_helper.rb:45:in `block in capture'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/helpers/capture_helper.rb:209:in `with_output_buffer'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/helpers/capture_helper.rb:45:in `capture'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/helpers/form_tag_helper.rb:585:in `field_set_tag'
       371ed960 | /usr/share/foreman/app/views/template_inputs/_form.html.erb:3:in `_cc6fa2aca2beb50ad0d8b478e8910c35'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/base.rb:247:in `public_send'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/base.rb:247:in `_run'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/template.rb:154:in `block in render'
       371ed960 | /usr/share/gems/gems/activesupport-6.1.7.6/lib/active_support/notifications.rb:205:in `instrument'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/template.rb:345:in `instrument_render_template'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/template.rb:152:in `render'
       371ed960 | /usr/share/gems/gems/deface-1.5.3/lib/deface/action_view_extensions.rb:43:in `render'
       371ed960 | /usr/share/gems/gems/actionview-6.1.7.6/lib/action_view/renderer/partial_renderer.rb:285:in `block in render_partial_template'

      Expected results:

      If we are disabling the feature, then it should remove all the associated integration from all the components of the satellite.

              rhn-support-alazik Adam Lazik
              rhn-support-sadas Satyajit Das
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: