Bug #2191

No distinction between no param default and "undef" default

Added by Dominic Cleal almost 8 years ago. Updated over 2 years ago.

Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:


A class declaration can have a parameter with no default:

class foo($bar)

Or an undef default:

class foo($bar = undef)

Both are returned from the proxy as having a nil value for the parameter, however the second case is an actual valid default value for the parameter. The class will run correctly if included without specifying this parameter, as it defaults to undef.

Proxy output:


Due to the null returned by the proxy, Foreman interprets both cases as it being a required parameter and so forces a value. If no value is given, then Foreman returns the parameter in the ENC output but with no value (bar:) which causes Puppet to state:

Error: Received incomplete information - no value provided for parameter bar on node ...

Better module design would be to use UNSET or similar as a default value anyway.

Associated revisions

Revision dd7018f8 (diff)
Added by Dominic Cleal over 7 years ago

fixes #2191 - undef in puppet class params is optional


#1 Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Target version set to 26

#2 Updated by Dominic Cleal over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal over 7 years ago

  • Target version changed from 26 to 1.2.0

#4 Updated by Greg Sutcliffe over 2 years ago

  • Target version deleted (1.2.0)

Also available in: Atom PDF