HomePhorge

(maint) Always use a remote env in the configurer
1335adda2f19Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(maint) Always use a remote env in the configurer

Before this commit the configurer would track the appropriate
environment to request from the master in the @environment variable.
This contained simply the name of the remote environment. The value was
passed through to various indirection requests as the :environment
parameter. However, as part of PUP-3244, something changed that caused
the configurer to begin failing when

  • The requested environment did not exist remotely
  • There was a cached catalog locally
  • The cached catalog referenced an environment that did not exist locally

This situation caused the indirector requests to contain an environment
name that the Puppet::Indirector::Request code would then try to expand
into a full environment instance by calling
Puppet.lookup(:environments).get!(env). However, since the environment
didn't exist locally the get! method raised an error.

This commit changes it so that the configurer always converts the
@environment, which is always the environment from the server for the
current run, to Puppet::Node::Environment.remote. This stops
Puppet::Indirector::Request from trying to load the environment
locally.

I don't know how this ever worked...

Details

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU1335adda2f19: (maint) Always use a remote env in the configurer (authored by Andrew Parker <andy@puppetlabs.com>).Oct 14 2014, 2:44 AM