Project

General

Profile

Actions

Bug #14352

closed

Configuration status is getting marked out of sync incorrectly

Added by Stephen Benjamin over 8 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Reporting
Target version:
-
Difficulty:
Triaged:
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 1 (0 open1 closed)

Is duplicate of Foreman - Refactor #13883: Host::Managed.last_report_object association uses deprecated :order parameterClosedDominic Cleal02/24/2016Actions
Actions #1

Updated by Dominic Cleal over 8 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.

Actions #2

Updated by Brad Buckingham over 8 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'

Actions #3

Updated by Stephen Benjamin over 8 years ago

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

Updated by Stephen Benjamin over 8 years ago

  • Status changed from Need more information to Duplicate

Thanks, that fixed it!

Actions #5

Updated by Stephen Benjamin over 8 years ago

  • Bugzilla link deleted (1321104)
Actions

Also available in: Atom PDF