| Puppet Version: 5.5.6 Puppet Server Version: 5.3.5 OS Name/Version: Ubuntu 16.04 LTS PuppetDB Version 5.2.4 **** custom fact don't get compiled. root@test-puppet04:~# puppet agent -t --noop --environment f20180907_fix_deprecated_code --tags netvault Info: Using configured environment 'f20180907_fix_deprecated_code' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Retrieving locales Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'b' expects a String value, got Undef (file: /etc/puppetlabs/code/environments/f20180907_fix_deprecated_code/modules/netvault/manifests/client/install.pp, line: 50, column: 6) on node test-puppet04.example.net Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Changes: Events: Resources: Time: {{ Fact generation: 0.01}} {{ Node retrieval: 0.13}} {{ Plugin sync: 0.64}} {{ Last run: 1536316270}} {{ Total: 3.25}} Version: {{ Config: }} {{ Puppet: 5.5.6}} root@test-puppet04:~# facter --puppet --debug|&grep netvault 2018-09-07 12:32:10.358615 INFO puppetlabs.facter - loading custom facts from /opt/puppetlabs/puppet/cache/lib/facter/netvault.rb. 2018-09-07 12:32:12.238808 DEBUG puppetlabs.facter - fact "netvault_architecture" has resolved to "64". 2018-09-07 12:32:12.248292 DEBUG puppetlabs.facter - fact "netvault_version" has resolved to "12001.04". netvault_architecture => 64 netvault_version => 12001.04 root@test-puppet04:~# egrep -n "versioncmp.*netvault_version" /etc/puppetlabs/code/environments/f20180907_fix_deprecated_code/modules/netvault/manifests/client/install.pp 50: if versioncmp($netvault::client::version, $::netvault_version) > 0 { Describe steps to reproduce: hard to say. this is a clean puppetserver installation with a repviously used puppetdb. the puppetdb was used with a puppetserver of the same version with a very small number of test machines. Desired Behavior: compilation should take custom facts into account. so versioncmp should not try to use an Undef value. Actual Behavior: see above. The current code works with puppetserver-3.8. The fact code was changed to produce a version number 12001.04 instead of former 12001.4 to make the puppet code puppet5 ready. |