Ask Your Question

"'versioncmp' parameter 'a' expects a String value, got Undef" on wildcard node definition

asked 2015-12-16 15:00:15 -0600

RCMMike gravatar image

On Puppet 4.3.1 on CentOS 7, I tried setting up the following site.pp:

node /\.local$/ {
   include commonhome
node 'default' {


No matter what other definitions I add or remove, I end up with the following errors when I try to apply it:

Error: Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Undef at /etc/puppetlabs/code/environments/production/modules/smartd/manifests/params.pp:27:6 on node puppet.local

If I don't use any wildcard definitions, it works fine.

What am I doing wrong?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-12-16 19:58:46 -0600

A wild guess, maybe when you don't use wildcard definitions, you hit the default node, and class commonhome is therefore not included.

To understand what the bug is we'd need to see the contents of the file mentioned: "got Undef at /etc/puppetlabs/code/environments/production/modules/smartd/manifests/params.pp:27:6" means the error is on line 27 in /etc/puppetlabs/code/environments/production/modules/smartd/manifests/params.pp.

edit flag offensive delete link more

answered 2016-02-16 03:55:26 -0600

deric gravatar image

Puppet 4 introduces strong type checking, all you have to do, is force a variable on line params.pp:27 to be a String:

From your code it's not obvious which variable it is, e.g. instead of:




edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-12-16 15:00:15 -0600

Seen: 1,837 times

Last updated: Feb 16 '16