'versioncmp' parameter 'a' expects a String value, got Undef" on a facter variable

asked 2018-08-31 04:23:07 -0500

uwebartels gravatar image

updated 2018-09-04 08:59:43 -0500

DarylW gravatar image

puppet agent version: 5.5.6 puppetserver version: 5.3.5 OS: Ubuntu 16.04 (same machine for puppetserver+agent)

got this puppet agent output:

Info: Using configured environment 'f20180831_add_motd_projectinfo'
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 'a' expects a String value, got Undef (file: /etc/puppetlabs/code/environments/f20180831_add_motd_projectinfo/modules/amp/manifests/sshd.pp, line: 27, column: 6) on node puppet01.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

the corresponding line in sshd.pp is

if versioncmp($::opensshdversion, '6.2') >= 0 {

facter shows that there is a value

root@puppet01:~# facter --puppet|grep opensshdversion
opensshdversion => 7.2p2

I'm wondering about the execution workflow. - retrieving pluginfacts (with or without execution?) - compile catalog Are the facts returned to the puppetserver for compilation? If not - is this a bug? If so, why is the compiler complaining?

edit retag flag offensive close merge delete