Bug #18400
openlast_compile not updated from facts, _timestamp removed
Description
Since we migrated our infrastructure to Puppet 4 we have noticed that facts are not being updated on Foreman. After debug a bit the problem we found that the facts yaml files for Puppet 4 are slightly different. The important part here is "_timestamp" fact, that has been renamed to "timestamp". The next links shows the change in Puppet 4 and the Foreman code that import the facts:
- Puppet 4: https://github.com/puppetlabs/puppet/blob/4.7.x/lib/puppet/node/facts.rb#L42
- Foreman: https://github.com/theforeman/foreman/blob/1.14-stable/app/models/host/base.rb#L123
We have patched ENC script to update the json before posting to Foreman API but would be better to update Foreman code.
Updated by Dominic Cleal over 7 years ago
- Subject changed from Facts not updated to last_compile not updated from facts, _timestamp removed
- Category set to Facts
I'm unsure that the timestamp (only used for the last_compile field) is related to facts not uploading. It should only affect the last_compile field.
That's indeed a bug, but I'm unsure that this has the impact you're suggesting. Facts should still upload and be displayed within Foreman.
Updated by David Moreno over 7 years ago
Dominic Cleal wrote:
I'm unsure that the timestamp (only used for the last_compile field) is related to facts not uploading. It should only affect the last_compile field.
That's indeed a bug, but I'm unsure that this has the impact you're suggesting. Facts should still upload and be displayed within Foreman.
You are probably right, but our facts were not updated. Maybe something on our side (e.g. different versions).