Book Image

Mastering Puppet

By : Thomas Uphill
Book Image

Mastering Puppet

By: Thomas Uphill

Overview of this book

Table of Contents (17 chapters)

Catalog failures


When the client requests a catalog, it is compiled on the master and sent down to the client. If the catalog fails to compile, the error is printed and can most likely be corrected easily. For example, the following base class has an obvious error:

class base {
  file {'one':
    path   => '/tmp/one',
    ensure => 'directory',
  }
  file {'one':
    path   => '/tmp/one',
    ensure => 'file',
  }
}

The file resource is defined twice with the same name. When we run Puppet, the error appears as shown in the following screenshot:

The duplicate declaration error is shown following Error 400 on SERVER.

HTTP 400 errors indicate that the request sent to the web server (Puppet server in this case) was malformed. In this case, the Puppet server are letting the client know that there was a problem with the request to compile a catalog. The previous versions of Puppet did not return error codes as useful as those shown in the preceding screenshot. Fixing this type of duplicate...