Hi Florin, I spawned a new test LXC and the facter --version command returns: 3.14.9 (commit 9115836a933a9191729305201b32ed46713ecf1b) I upgraded the facter with "/opt/puppetlabs/puppet/bin/gem install facter" to facter-4.0.33 and the issue seem to have disapeared for the commandline, however when checking the facts through foreman or via the puppet facts command the values are still wrong:
root@LXC # puppet facts |grep uptime |
"ia_uptime_seconds": "79", |
"system_uptime": { |
"uptime": "22 days" |
"uptime": "22 days", |
"uptime_days": 22, |
"uptime_hours": 549, |
"uptime_seconds": 1978892, |
|
root@LXC # facter uptime |
0:01 hours
|
I thought I may have another facter binary but didn't find such:
root@LXC # find / -name facter |
/opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/facter-4.0.33/lib/facter |
/opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/facter-4.0.33/bin/facter |
/opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/doc/facter-4.0.33/ri/lib/facter |
/opt/puppetlabs/puppet/cache/lib/facter |
/opt/puppetlabs/puppet/bin/facter |
/opt/puppetlabs/bin/facter |
/opt/puppetlabs/facter |
|
root@LXC # ll /opt/puppetlabs/puppet/bin/facter |
-rwxr-xr-x 1 root root 613 Aug 6 11:09 /opt/puppetlabs/puppet/bin/facter* |
|
root@LXC # ll /opt/puppetlabs/bin/facter |
lrwxrwxrwx 1 root root 24 Mar 7 20:27 /opt/puppetlabs/bin/facter -> ../puppet/bin/wrapper.sh* |
|
Both binaries with --version return 4.0.33 I noticed that there is also a facter-ng installed and removed it to verify that it is not causing the issue but the issue remains after that as well:
root@LXC # /opt/puppetlabs/puppet/bin/gem list |grep facter |
facter (4.0.33, 3.14.9) |
facter-ng (4.0.9.pre) |
|
root@LXC # /opt/puppetlabs/puppet/bin/gem uninstall facter-ng |
Remove executables: |
facter-ng |
|
in addition to the gem? [Yn] Y |
Removing facter-ng |
Successfully uninstalled facter-ng-4.0.9.pre
|
After each change I was doing a reboot of the container and a puppet run to verify that the facts are updated. I assume that puppet doesn't pull the facts with facter uptime, can you share how is it retrieving them? |