Puppet is a fairly complicated little product once you start to look under the covers, and by now it’s pretty widely know that for larger environments, moving from 2.6 to 2.7 isn’t a particularly straightforward upgrade. Most of people’s various pain points relate to the deprecation of dynamic scoping in favor of lexical scoping and parameterized classes, but there’s some other gotchas that haven’t been as widely publicized. Here’s a few.

Undefined template variables have changed

Previously, if you attempted to look up a variable from a template, and that variable did not exist, it would return a Ruby nil, which is a fairly intuitive and straightforward behavior that a lot of people came to rely on in their conditionals. In Puppet 2.7, however, this value is now the symbol :undefined. Ensure that all of your templates are not running under the assumption that undefined variables return the value nil.

Globbing imports are now considered undefined behavior

If you have this guy at the top of any of your manifests for some reason (like Puppet’s autoloader being horrendous until the 2.6 series):

Chances are that it will not work, and instead it will return an error that your class is not defined. Ensure that your classes and defines are all named name.pp and let the autoloader do its thing instead. It should work fine, even for nested classes inside subdirectories.

–show_diff is no longer enabled by default in –noop mode

Some people have operations toolchains that rely on Puppet’s –noop mode showing a diff for each file that it’s going to modify on the next real run. Do note that these scripts will need to be updated to explicitly specify the –show_diff option — the new default behavior is now to log these diffs to syslog instead.

Beyond these three, I had a fairly straightforward upgrade of our Puppet environment. Happy hunting!