/api/hosts generates an error

I tried the patch, but it did not help. So I decided to just get rid of the Hosts Reports plugin - they are not used anyway. Went through the steps - but I get a failure on running.

foreman-installer --no-enable-foreman-plugin-host-reports --no-enable-foreman-proxy-plugin-reports

I get the same 500 Internal Server Error that I have been seeing.

2022-08-16 11:25:05 [DEBUG ] [configure] Foreman_proxy::Settings_file[remote_execution_ssh]: Starting to evaluate the resource (1603 of 1636)
2022-08-16 11:25:05 [DEBUG ] [configure] Foreman_proxy::Settings_file[remote_execution_ssh]: Evaluated in 0.00 seconds
2022-08-16 11:25:05 [DEBUG ] [configure] Class[Foreman_proxy::Service]: Starting to evaluate the resource (1604 of 1636)
2022-08-16 11:25:05 [DEBUG ] [configure] Class[Foreman_proxy::Service]: Evaluated in 0.00 seconds
2022-08-16 11:25:05 [DEBUG ] [configure] /Service[foreman-proxy]: Starting to evaluate the resource (1605 of 1636)
2022-08-16 11:25:05 [DEBUG ] [configure] Executing: '/bin/systemctl is-active -- foreman-proxy'
2022-08-16 11:25:05 [DEBUG ] [configure] Executing: '/bin/systemctl is-enabled -- foreman-proxy'
2022-08-16 11:25:05 [DEBUG ] [configure] /Service[foreman-proxy]: Evaluated in 0.02 seconds
2022-08-16 11:25:05 [DEBUG ] [configure] Class[Foreman_proxy::Service]: Starting to evaluate the resource (1606 of 1636)
2022-08-16 11:25:05 [DEBUG ] [configure] Class[Foreman_proxy::Service]: Evaluated in 0.00 seconds
2022-08-16 11:25:05 [DEBUG ] [configure] Class[Foreman_proxy::Register]: Starting to evaluate the resource (1607 of 1636)
2022-08-16 11:25:05 [DEBUG ] [configure] Class[Foreman_proxy::Register]: Evaluated in 0.00 seconds
2022-08-16 11:25:05 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_host[foreman-proxy-foreman01.poling.local]: Starting to evaluate the resource (1608 of 1636)
2022-08-16 11:25:05 [DEBUG ] [configure] Foreman_host[foreman-proxy-foreman01.poling.local](provider=rest_v3): Making get request to https://foreman01.poling.local/api/v2/hosts?search=name%3D%22foreman01.poling.local%22
2022-08-16 11:25:07 [DEBUG ] [configure] Foreman_host[foreman-proxy-foreman01.poling.local](provider=rest_v3): Received response 500 from request to https://foreman01.poling.local/api/v2/hosts?search=name%3D%22foreman01.poling.local%22
2022-08-16 11:25:07 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_host[foreman-proxy-foreman01.poling.local]: Could not evaluate: Error making GET request to Foreman at https://foreman01.poling.local/api/v2/hosts: Response: 500 Internal Server Error: Check /var/log/foreman/production.log on foreman01.poling.local for detailed information
2022-08-16 11:25:07 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_host[foreman-proxy-foreman01.poling.local]: Evaluated in 2.28 seconds
2022-08-16 11:25:07 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Starting to evaluate the resource (1609 of 1636)
2022-08-16 11:25:07 [DEBUG ] [configure] Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Collected {"features"=>["Discovery", "BMC", "DHCP", "Puppet", "Puppet CA", "Realm", "TFTP", "Logs", "Dynflow", "Ansible", "Openscap", "Script"]}
2022-08-16 11:25:07 [DEBUG ] [configure] Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Selecting source_key features
2022-08-16 11:25:07 [DEBUG ] [configure] Datacat_collector[foreman_proxy::enabled_features](provider=datacat_collector): Now setting field :features
2022-08-16 11:25:07 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Datacat_collector[foreman_proxy::enabled_features]: Evaluated in 0.00 seconds
2022-08-16 11:25:07 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman01.poling.local]: Starting to evaluate the resource (1610 of 1636)
2022-08-16 11:25:07 [DEBUG ] [configure] Foreman_smartproxy[foreman01.poling.local](provider=rest_v3): Making get request to https://foreman01.poling.local/api/v2/smart_proxies?search=name%3D%22foreman01.poling.local%22
2022-08-16 11:25:09 [DEBUG ] [configure] Foreman_smartproxy[foreman01.poling.local](provider=rest_v3): Received response 200 from request to https://foreman01.poling.local/api/v2/smart_proxies?search=name%3D%22foreman01.poling.local%22
2022-08-16 11:25:09 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman01.poling.local]: Evaluated in 2.19 seconds
2022-08-16 11:25:09 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy_host[foreman-proxy-foreman01.poling.local]: Starting to evaluate the resource (1611 of 1636)
2022-08-16 11:25:09 [INFO  ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy_host[foreman-proxy-foreman01.poling.local]: Dependency Foreman_host[foreman-proxy-foreman01.poling.local] has failures: true
2022-08-16 11:25:09 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy_host[foreman-proxy-foreman01.poling.local]: Skipping because of failed dependencies
2022-08-16 11:25:09 [DEBUG ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy_host[foreman-proxy-foreman01.poling.local]: Resource is being skipped, unscheduling all events

Based on this message:

2022-08-16 11:25:07 [DEBUG ] [configure] Foreman_host[foreman-proxy-foreman01.poling.local](provider=rest_v3): Received response 500 from request to https://foreman01.poling.local/api/v2/hosts?search=name%3D%22foreman01.poling.local%22

I am assuming this is all related as I still get an error on GET /api/hosts of:

"undefined method `failure' for #<ConfigReport:0x00000000090dbb88>\nDid you mean?  failed"

Looking at the /foreman/production.log I see the same errors as before.

2022-08-16T13:07:09 [I|app|43833443] Completed 200 OK in 35ms (Views: 8.4ms | ActiveRecord: 12.1ms | Allocations: 8474)
2022-08-16T13:07:09 [I|app|60dad880]   Rendered dashboard/_status_chart_widget.html.erb (Duration: 57.1ms | Allocations: 17536)
2022-08-16T13:07:09 [I|app|60dad880] Completed 200 OK in 120ms (Views: 33.5ms | ActiveRecord: 71.5ms | Allocations: 37097)
2022-08-16T13:07:09 [I|app|7cd6c128]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-6.0.2/app/views/foreman_tasks/tasks/dashboard/_latest_tasks_in_error_warning.html.erb (Duration: 29.7ms | Allocations: 17616)
2022-08-16T13:07:09 [I|app|7cd6c128] Completed 200 OK in 51ms (Views: 31.9ms | ActiveRecord: 5.5ms | Allocations: 24463)
2022-08-16T13:07:18 [I|app|d2fb9f4b] Started GET "/api/hosts" for 10.0.20.110 at 2022-08-16 13:07:18 -0400
2022-08-16T13:07:18 [I|app|d2fb9f4b] Processing by Api::V2::HostsController#index as JSON
2022-08-16T13:07:18 [I|app|d2fb9f4b]   Parameters: {"apiv"=>"v2"}
2022-08-16T13:07:18 [I|app|d2fb9f4b]   Rendering api/v2/hosts/index.json.rabl within api/v2/layouts/index_layout
2022-08-16T13:07:18 [I|app|d2fb9f4b]   Rendered api/v2/hosts/index.json.rabl within api/v2/layouts/index_layout (Duration: 32.1ms | Allocations: 4851)
2022-08-16T13:07:18 [W|app|d2fb9f4b] Action failed
2022-08-16T13:07:18 [I|app|d2fb9f4b] Backtrace for 'Action failed' error (ActionView::Template::Error): undefined method `failure' for #<ConfigReport:0x00000000090dbb88>
 d2fb9f4b | Did you mean?  failed
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.4.7/lib/active_model/attribute_methods.rb:432:in `method_missing'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_reports-1.0.2/app/models/host_status/host_report_status.rb:24:in `failure'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_reports-1.0.2/app/models/host_status/host_report_status.rb:36:in `failure?'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_reports-1.0.2/app/models/host_status/host_report_status.rb:109:in `to_global'
 d2fb9f4b | /usr/share/foreman/app/models/host_status/global.rb:20:in `block in build'
 d2fb9f4b | /usr/share/foreman/app/models/host_status/global.rb:20:in `map'
 d2fb9f4b | /usr/share/foreman/app/models/host_status/global.rb:20:in `build'
 d2fb9f4b | /usr/share/foreman/app/models/host/managed.rb:793:in `global_status_label'
 d2fb9f4b | /usr/share/foreman/app/views/api/v2/hosts/main.json.rabl:8:in `cached_source_3423863680930699800'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/engine.rb:429:in `eval_source'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/engine.rb:37:in `apply'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/helpers.rb:136:in `object_to_engine'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/partials.rb:15:in `partial_as_engine'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/builder.rb:201:in `extends'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/builder.rb:116:in `block in compile_settings'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/builder.rb:115:in `each'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/builder.rb:115:in `compile_settings'
 d2fb9f4b | /opt/theforeman/tfm/root/usr/share/gems/gems/rabl-0.14.3/lib/rabl/builder.rb:35:in `engines'

I ran

yum remove tfm-rubygem-foreman_host_reports

in an attempt to get rid of the host reports - but have a feeling that i am missing something in the clean ip process. Is there another process I should use to clear out all remnants of this plugin?