Puppet 4.0 Release Notes

This version of Puppet is not included in Puppet Enterprise. The latest version of PE includes Puppet 4.9. A newer version is available; see the version menu above for details.

These are the release notes for Puppet 4.0, released April 15 2015. There’s a lot of information here so it’s organized top to bottom by size of impact – things everyone is going to notice will be at the top and minor bugfixes/improvements are down at the bottom.

BREAK: Changes to Platform Support, Repos, and Installation

All-in-One Packaging

The first thing you’ll notice is that the packaging has changed pretty dramatically. Puppet had gotten complicated enough, and the systems it runs on diverse enough, that it became really difficult to provide the proverbial “one-click install” through our Linux-distribution style packaging. For Puppet 4, we’ve gone to an All-In-One package (which we refer to as “AIO”, like a bad hand in Words With Friends), which includes Puppet 4, both Facter 2.4 and CFacter 0.4, the latest Hiera and Mcollective, as well Ruby 2.1.5, OpenSSL 1.0.0r, and our gem dependencies. The package installs into its own area in /opt/puppetlabs and is named puppet-agent so it will not auto-upgrade existing systems with the puppet package installed (it will, however, replace them if you opt-in to the upgrade).

BREAK: New Locations for Important Files and Directories

Related to the AIO packaging changes, there are new locations on the filesystem for the binaries, configuration, and code. The goals were to make a unified filesystem layout for all Puppet/PE installations and to enable continuous-deployment workflows with r10k. There’s a separate top-level guide which summarizes the changes.

The End of Ruby 1.8.7

One of the benefits of the All-in-One packaging is no longer being dependent on the version of Ruby provided by the different operating system. This let us consolidate on a fast, stable, modern version – Ruby 2.1.5 – across all operating systems (including Windows) and remove a ton of hacky work-arounds left over from the Ruby 1.8.7 days.

If you’re using the AIO packaging, the whole Puppet toolset (facter, mcollective, etc) will all work out of the box; if you’re running from gem or source, however, make sure you’re running a recent Ruby interpreter.

OS Support

BREAK: Next Version of Puppet Language

By far the most significant user-facing change in Puppet 4 is the completely rewritten parser and evaluator, which are the parts of Puppet that take your modules and transform them into a catalog for each node that checks in. This was originally introduced as an opt-in “Future Parser”, and over the last year, community feedback, user research, and engineering time have honed the Future Parser to the point where it’s no longer in the realm of the future – it’s here.

The rewritten parser includes new capabilities like iteration and type-checking for variables as well as deprecations and changed behaviour. Most notably, the stricter, more predictable parsing of numbers, empty strings, and “undef”/”nil” comparisons may cause changes to a node’s catalog without necessarily producing an error.

BREAK: Directory Environments Replace Config File Environments

Starting with Puppet 3.6, Directory Environments started taking over from Dynamic Environments as Puppet’s mechanism for serving different versions of modules and code. In Puppet 4, they’re the default and other environment support is gone. Read more about directory environments in the environments section of the docs.

BREAK: Removed Puppet Kick, ActiveRecord, and Inventory Service

There’s been a lot of accumulated technical debt in Puppet’s code base: old features which were deprecated but never removed, half-implemented experiments, and interested things that turned out to be really bad ideas. Almost 60,000 lines of code have been removed from the repository, comprising things like the pre-PuppetDB stored configs, puppet kick, and an unsupported CouchDB facts terminus.


An important set of changes in Puppet 4 involve the URLs the agents and master use to communicate with one another over the network. We’ve standardized the endpoints onto the same namespaced, versioned standard as other Puppet projects like PuppetDB, which should make for much better compatibility guarantees. A side effect of this, however, is that currently Puppet 3 agents cannot talk to Puppet 4 masters; this compatbility layer will be introduced in Puppet-Server 2.1. See the upgrade docs for servers and agents for step-by-step instructions to safely update your existing infrastructure.

New Language Features

In addition to the core language changes, there are some new functions available along with a new function API that’s written on top of the 4.x parser. No longer will you have to restart a long-running puppetmaster to get it to pick up new versions of your function code! One of the coolest built-in functions is “EPP”, or Embedded Puppet, which enables inline and file-based templates similar to ERB (Embedded Ruby) but written in the Puppet Language directly. This helps reduce the cognitive dissonance of switching back and forth between the Puppet Language and Ruby (“Are my variables prefixed with dollar signs or not?!”) and lets you use the Puppet’s tooling for templates as well as your manifests. Read more about EPP in the function reference guide.

Changes to support Puppet Server and CA

BREAK: Changed Defaults for Settings

BREAK: Puppet Doc and Tagmail Removed from Core, Released as Modules

For users of puppet doc, check out the new puppetlabs-strings module on the Forge. puppet doc relied on RDoc behaviours which broke in newer Ruby versions. Similarly, the tagmail report processor didn’t work under Puppet Server and it seemed like a good candidate to move into a modules, so it’s available at puppetlabs-tagmail on the Forge.

Internal Cleanups and Dead Code Removal

Nearly all users can ignore these removals, but we’re including them for completeness’s sake.

BREAK: Resource Types/Providers With Changed Behavior

BREAK: Internal API and Implementation Changes

These changes affect Puppet’s internal Ruby methods and libraries. Their removal should affect either no one, or a small number of extension authors.

Most of these changes remove code that was previously deprecated.

Stuff a lot of people will notice

A lot of these changes codify defaults changes that were deprecated or on-the-way in Puppet 3.x but couldn’t flip over to be the default except on a semver major number boundary. For example, the stringify_facts setting (which causes the agent to submit all Facter facts as strings) is gone, because non-stringified-facts are now the default. Similarly, the Modulefile which described puppet module metadata was deprecated in 3.5 in favour of the metadata.json file, and now the transitional support for it is gone completely.

Module authors who use the prefetch method in custom providers may want to be aware of the changes in PUP-3656. Two things to consider:

  1. Previously, the prefetch method could throw any exception and puppet would carry on. As discussed above this is the wrong behavior in general, however some module authors may have stumbled across this, allowed/encouraged prefetch to throw exceptions, and let puppet runs succeed. So modules should be examined for this assumption.
  2. The only two legitimate causes for prefetch to throw an exception now are LoadError and (added in this puppet 4.0) Puppet::MissingCommand

Stuff nearly nobody will notice

CLI, Faces, and Logging Improvements

Bug Fixes

New Deprecations

Regression: --profile flag produces less information

In Puppet 4, functions converted to the Puppet 4 function API were not included in the profiling information produced by the --profile flag. This caused the profiling output to produce less information than in Puppet 3. Puppet 4.3.2 restores this missing information.

Regression: Resource collectors can’t use resource references

Puppet 4.0 introduced a regression where resource collectors using resource references would produce an error. Puppet 4.3.2 fixes that regression.

Resource Type and Provider Improvements

The biggest change in this category is PUP-1073, which implements a long-standing feature request. The Type docs have the details, but now you can, for example, have the same package name like “mysql” managed by two separate resources, one for the gem version and one for the RPM version.

Resource Type and Provider Bugs

Some of these are subtle, some more in-your-face, but for the most part these bugfixes caused Puppet to behave slightly differently – better, but differently – and therefore had to wait for Puppet 4.0 to see the light of day.

On OpenBSD

Thanks to Jasper Lievisse Adriaanse and Zach Leslie for these changes to help Puppet work better on BSDs.

On Windows

On Windows, group resources now respect the auth_membership attribute, which lets you control whether members is the complete list of members or a minimum list of members. (Previously, Puppet ignored this attribute on Windows.) Note that the default value of this attribute has also changed; see the breaking changes section on resource types.

Weekly scheduled_task resources would attempt to set the trigger on every run, due to part of the trigger being compared to the wrong thing. This is fixed.

Puppet Language, Hiera, and Function Features

New Features in Resource Type and Provider API

Miscellaneous Improvements and Bug Fixes

Miscellaneous New Features

Performance Improvements

New Feature: Data Binder

Preparations for Facter 3.0

Module Tool Improvements

Administrivia, Testing, Docs and Specs, Packaging, Internal Clean-ups



↑ Back to top