Project

General

Profile

Bug #14352

Configuration status is getting marked out of sync incorrectly

Added by Stephen Benjamin almost 6 years ago. Updated almost 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Reporting
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1321104
Description of problem:
Host's last report was 22 minutes ago, but it shows out of sync in the UI.

irb(main):026:0> time_ago_in_words(host.last_report)
=> "25 minutes"
irb(main):027:0> host.get_status(HostStatus::ConfigurationStatus)
=> #<HostStatus::ConfigurationStatus id: 9, type: "HostStatus::ConfigurationStatus", status: 117440512, host_id: 4, reported_at: "2016-03-24 04:21:21">
irb(main):028:0> host.get_status(HostStatus::ConfigurationStatus).to_label
=> "Out of sync"
irb(main):029:0> Setting[:puppet_interval]
=> 30

Version-Release number of selected component (if applicable):
6.2 Snap 5.1

How reproducible:
Always

Steps to Reproduce:
1. Create a host managed by puppet

Actual results:
Some time after the first report shows up, the host will go to out of sync

Expected results:
Host shows OK up to Setting[:puppet_interval] after report

Additional info:


Related issues

Is duplicate of Foreman - Refactor #13883: Host::Managed.last_report_object association uses deprecated :order parameterClosed2016-02-24

History

#1 Updated by Dominic Cleal almost 6 years ago

  • Category set to Reporting
  • Status changed from New to Need more information

Do you have the fix from #13883 for the same issue?

Please provide the output of host.last_report_object and your current time to compare to the reported_at field in the configuration status object.

#2 Updated by Brad Buckingham almost 6 years ago

It does not appear that the build in question has the fix referenced by http://projects.theforeman.org/issues/13883 .

That build has:
12 has_one :last_report_object, :foreign_key => :host_id, :order => "#{Report.table_name}.id DESC", :class_name => 'ConfigReport'

#3 Updated by Stephen Benjamin almost 6 years ago

  • Is duplicate of Refactor #13883: Host::Managed.last_report_object association uses deprecated :order parameter added

#4 Updated by Stephen Benjamin almost 6 years ago

  • Status changed from Need more information to Duplicate

Thanks, that fixed it!

#5 Updated by Stephen Benjamin almost 6 years ago

  • Bugzilla link deleted (1321104)

Also available in: Atom PDF