The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #1387

parseonly fails when using custom types

Added by Peter Meier over 7 years ago. Updated over 3 years ago.

Status:AcceptedStart date:07/01/2008
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:0.24.4 Branch:
Keywords:parseonly, custom types

We've Moved!

Ticket tracking is now hosted in JIRA:


If I have cutom types, like the mysql type from DavidS and use them in manifests, the manifests will fail with the parseonly option.

It seems obvious that puppet can’t know anything from your own types and therefor the type is unknown to it. However if you’d like to use parseonly as a sytax checker, this behaviour is obviously not that cool. On the otherside for a complete syntax check parseonly should fail on unknown types.

Maybe this problem could be “solved” by adding a —ignoreunknowntypes option to the —parseonly option, like the —ignoreimports option. A better, but I think more complicated, solution would be to have an additional option to pass additional (module) directories to the —parseonly option, where the custom types can be looked up.

We’d like to use the parseonly option for syntax checking while checking in, however as we use custom types we can’t currently use it.


#1 Updated by James Turnbull about 7 years ago

  • Category set to newfeature
  • Status changed from Unreviewed to Needs More Information

Can you provide some logs for reference. Thanks

#2 Updated by James Turnbull about 7 years ago

  • Status changed from Needs More Information to Accepted

puppet —parseonly —debug —trace manifests/munin.pp 06:19:33 < duritong> err: Could not parse for environment development: Unknown function

                 mysql_password at 

#3 Updated by Peter Meier about 7 years ago

a way to reproduce it:

$ git clone git://
$ cd puppet-mysql/
$ puppet --parseonly --trace manifests/munin.pp
err: Could not parse for environment development: Unknown function mysql_password at /tmp/puppet-mysql/manifests/munin.pp:9

mysql_password is defined as a custom function. However it will also fail with custom types.

#4 Updated by Kelsey Hightower over 3 years ago

  • Description updated (diff)

Ok, so better late than never :)

The ablility to validate manifests using custom types seems to be fixed in atleast Puppet 2.7.x:

$ git clone git://
$ cd puppet-mysql/
$ puppet parser validate manifests/server/munin/default.pp

Also available in: Atom PDF