Project

General

Profile

Actions

Bug #10335

closed

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

Added by Marek Hulán almost 9 years ago. Updated almost 9 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=1217143
Description of problem:

Deleting the provisioned hosts first for which oscap report exists leads to inaccessible compliance-report page. https://sat6.redhat.com/compliance/arf_reports

We see the message "undefined method `host_status' for nil:NilClass" while accessing the compliance-reporting page.

2015-04-29 10:27:58 [I] Processing by ScaptimonyArfReportsController#index as HTML
2015-04-29 10:27:58 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.5/app/views/scaptimony_arf_reports/_list.html.erb (30.9ms)
2015-04-29 10:27:58 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.5/app/views/scaptimony_arf_reports/index.html.erb within layouts/application (32.4ms)
2015-04-29 10:27:58 [W] Operation FAILED: undefined method `host_status' for nil:NilClass
2015-04-29 10:27:58 [I] Rendered common/500.html.erb within layouts/application (14.2ms)
2015-04-29 10:27:58 [I] Rendered layouts/base.html.erb (3.4ms)
2015-04-29 10:27:58 [I] Completed 500 Internal Server Error in 106ms (Views: 25.6ms | ActiveRecord: 6.2ms)

Also while accessing the Sat61 dashboard page.

2015-04-29 10:30:04 [I] Processing by DashboardController#index as HTML
2015-04-29 10:30:06 [I] Rendered dashboard/_status_widget.html.erb (66.9ms)
2015-04-29 10:30:06 [I] Rendered dashboard/_status_chart_widget.html.erb (8.2ms)
2015-04-29 10:30:06 [I] Rendered dashboard/_reports_widget.html.erb (91.8ms)
2015-04-29 10:30:06 [I] Rendered dashboard/_distribution_widget.html.erb (170.3ms)
2015-04-29 10:30:06 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-2.0.0.9/app/views/dashboard/_discovery_widget.html.erb (44.6ms)
2015-04-29 10:30:07 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_openscap-0.3.2.5/app/views/dashboard/_foreman_openscap_host_reports_widget.html.erb (924.9ms)
2015-04-29 10:30:07 [I] Rendered dashboard/index.html.erb within layouts/application (1355.3ms)
2015-04-29 10:30:07 [W] Operation FAILED: undefined method `name' for nil:NilClass
2015-04-29 10:30:07 [I] Rendered common/500.html.erb within layouts/application (7.8ms)
2015-04-29 10:30:07 [I] Rendered layouts/base.html.erb (2.4ms)
2015-04-29 10:30:07 [I] Completed 500 Internal Server Error in 3049ms (Views: 37.1ms | ActiveRecord: 166.9ms)

Version-Release number of selected component (if applicable):
with sat61-Beta-RC7

How reproducible:

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

Actual results:

Leads to,
1) Inaccessible OSCAP compliance page link
and
2) Inaccesible satellite6 dashoard (foreman dashbaord)

Expected results:

Even if the Hosts are deleted directly without first deleting the reports, the OSCAP compliance report shouldn't be inaccessible.

Additional info:

Actions #1

Updated by Marek Hulán almost 9 years ago

  • Status changed from New to Ready For Testing
  • Assignee changed from Ohad Levy to Marek Hulán
  • Pull request https://github.com/OpenSCAP/foreman_openscap/pull/100 added
  • Pull request deleted ()
Actions #2

Updated by Marek Hulán almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Shlomi Zadok almost 9 years ago

  • Status changed from Closed to Ready For Testing
  • Assignee changed from Marek Hulán to Shlomi Zadok
  • Pull request https://github.com/OpenSCAP/foreman_openscap/pull/102 added
  • Pull request deleted (https://github.com/OpenSCAP/foreman_openscap/pull/100)

re-opened as dashboard was also broken if a host was deleted. fixed with https://github.com/OpenSCAP/foreman_openscap/pull/102

Actions #4

Updated by Shlomi Zadok almost 9 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF