Hide Forgot
Description of problem: The two reports in Host COnfiguration status widget of Dashboard are not working fine. 1- Last seen reports. 2- Hosts with Alert disabled How reproducible: Every time we click on Host COnfiguration Status for Puppet and Ansible Widget. Report names- Host with no reports and Hosts with alerts disabled. Steps to Reproduce: 1. Click on the widget shows Hosts with No reports. It will search with Query- origin = Puppet and last_report > "35 minutes ago" and not has last_report and status.enabled = true 2. Click on the Widget Hosts with alert disabled. it will search with query - last_report > "30 minutes ago" and status.enabled = false Actual results: The query fails to get the proper results and shows no hostnames. If we remote the time interval the search works fine. Expected results: The search should show the correct result. Additional info: Impacted code. /usr/share/foreman/app/helpers/dashboard_helper.rb: def search_filter_with_origin(filter, origin, within_interval = false) interval_setting = report_origin_interval_setting(origin) additional_filters = [] additional_filters << "origin = #{origin}" if origin additional_filters << "last_report #{within_interval ? '<' : '>'} \"#{interval_setting} minutes ago\"" if out_of_sync_enabled?(origin) (additional_filters + [filter]).join(' and ') end
Verified on Sat 6.6 Snap 11. Dasboard widgets for Ansible, Puppet and All Hosts contain following queries: Ansible Hosts with no reports: origin = Ansible and not has last_report and status.enabled = true Hosts with alerts disabled: origin = Ansible and status.enabled = false Puppet Hosts with no reports: origin = Puppet and not has last_report and status.enabled = true Hosts with alerts disabled: origin = Puppet and status.enabled = false All Hosts with no reports: not has last_report and status.enabled = true Hosts with alerts disabled: status.enabled = false
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:3172