Project

General

Profile

Actions

Bug #10549

closed

deleting the provisioned hosts for which oscap report exists leads to inaccessible compliance-policy dashboard

Added by Shlomi Zadok almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1222933
Description of problem:

2015-05-19 23:51:53 [I] Processing by ScaptimonyPolicyDashboardController#index as HTML
2015-05-19 23:51:53 [I] Parameters: {"id"=>"2"}
2015-05-19 23:51:54 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.8/app/views/scaptimony_policy_dashboard/_policy_status_widget.html.erb (11.9ms)
2015-05-19 23:51:54 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.8/app/views/scaptimony_policy_dashboard/_policy_chart_widget.html.erb (3.1ms)
2015-05-19 23:51:54 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.8/app/views/scaptimony_policy_dashboard/_policy_reports.html.erb (67.5ms)
2015-05-19 23:51:54 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.8/app/views/scaptimony_policy_dashboard/index.html.erb within layouts/application (101.9ms)
2015-05-19 23:51:54 [W] Operation FAILED: undefined method `host_status' for nil:NilClass
2015-05-19 23:51:54 [I] Rendered common/500.html.erb within layouts/application (14.5ms)
2015-05-19 23:51:54 [I] Rendered layouts/base.html.erb (3.6ms)
2015-05-19 23:51:54 [I] Completed 500 Internal Server Error in 271ms (Views: 23.9ms | ActiveRecord: 14.2ms)

Version-Release number of selected component (if applicable):
sat6.1-GA-snap3

How reproducible:

Steps to Reproduce:
1. delete the provisioned host without deleting the respective compliance report.
2.
3.

Actual results:
Leads to, Inaccessible OSCAP policies page link

On accessing the below link, we get the below message
https://dhcp207-57.lab.eng.pnq.redhat.com/compliance/policies/2/dashboard

Oops, we're sorry but something went wrong

undefined method `host_status' for nil:NilClass

Expected results:

Even if the Hosts are deleted directly without first deleting the reports, the OSCAP policies-dashboard page shouldn't be inaccessible.

Additional info:

Actions #1

Updated by Shlomi Zadok almost 10 years ago

  • Status changed from New to Ready For Testing
  • Assignee changed from Ohad Levy to Shlomi Zadok
  • Pull request https://github.com/theforeman/foreman_openscap/pull/104 added
  • Pull request deleted ()
Actions #2

Updated by Shlomi Zadok almost 10 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF