Project

General

Profile

Actions

Bug #2967

closed

Foreman is randomly missing certain facts

Added by Anders Sveen almost 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Facts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have set up Foreman with ENC integration and pushing facts with the script at https://github.com/theforeman/puppet-foreman/blob/master/templates/external_node.rb.erb . After activating this I could see that facts were coming in and I could query. We currently have 8 hosts running.

If I do a query for facts "name = puppetversion" 8 hosts and their values shows up. This seems to return the correct number of hosts all the time.

If I do a query for facts "name = memoryfree" it usually displays something between 4 and 6 hosts. Only rarely do I see 8 hosts. The number and which hosts that show up vary over time.

This behavior is consistent across two different deployments of Foreman I have. They are installed with yum on RHEL6 systems. I'm currently running on SQLite3. Anothe reporter (see mail thread below) is running Postgres.

Production log for foreman:

Started POST "/fact_values/create?format=yml" for 127.0.0.1 at 2013-08-23 03:35:24 +0200
Processing by FactValuesController#create as YML
  Parameters: {"facts"=>"[FILTERED]"}
  Rendered text template (0.0ms)
Completed 200 OK in 92ms (Views: 0.8ms | ActiveRecord: 50.0ms)

See the following mail thread for some history and another reporter having the same issue: https://groups.google.com/forum/#!topic/foreman-users/KQ-YxXLuLDA

Actions #1

Updated by Anders Sveen almost 11 years ago

The values seems to be missing in the database:

sqlite> select fact_values.* from fact_values inner join fact_names on fact_names.id=fact_values.fact_name_id where fact_names.name='memoryfree';
16612|33.11 GB|17|8|2013-08-27 11:29:43.404051|2013-08-27 11:29:43.404051
16690|29.20 GB|17|7|2013-08-27 13:05:25.528203|2013-08-27 13:05:25.528203

Should give 8 entries.

Actions #2

Updated by Ohad Levy over 10 years ago

  • Assignee set to Ohad Levy
  • Target version set to 1.15.0
Actions #3

Updated by Anders Sveen over 10 years ago

Upgraded to 1.3.1 and replaced scripts according to instructions for the 1.3 release. I also switched to MySQL and still seeing the same behaviour. :)

Actions #4

Updated by Ohad Levy over 10 years ago

Anders Sveen wrote:

Upgraded to 1.3.1 and replaced scripts according to instructions for the 1.3 release. I also switched to MySQL and still seeing the same behaviour. :)

Are you willing to try https://github.com/theforeman/foreman/pull/975, I'm unable to reproduce the issue after this patch.

Actions #5

Updated by Ohad Levy over 10 years ago

  • Status changed from New to Ready For Testing
Actions #6

Updated by Ohad Levy over 10 years ago

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

Updated by Dominic Cleal over 10 years ago

  • Translation missing: en.field_release set to 1
Actions #8

Updated by Anders Sveen over 10 years ago

Ohad Levy wrote:

Anders Sveen wrote:

Upgraded to 1.3.1 and replaced scripts according to instructions for the 1.3 release. I also switched to MySQL and still seeing the same behaviour. :)

Are you willing to try https://github.com/theforeman/foreman/pull/975, I'm unable to reproduce the issue after this patch.

I can try that, but not quite sure how to do it. :) I'm running off rpm packages via yum (foreman-1.3.0-1.el6.noarch). What would be the best way to apply this patch and make rollback easy?

Anders,

Actions #9

Updated by Ohad Levy over 10 years ago

this is already part of the 1.3.1 release, if you prefer to wait, I assume next Monday it would be released.

Actions #10

Updated by Anders Sveen over 10 years ago

Ohad Levy wrote:

this is already part of the 1.3.1 release, if you prefer to wait, I assume next Monday it would be released.

Alright, I'll wait and verify with the 1.3.1 release. :) Thanks.

Actions

Also available in: Atom PDF