You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During catalog compilation, after loading the requested environment we
load the node and server specified environment. Previously, We would
then compare the Environment objects to determine if the requested
environment matched the server specified environment. However, if the
environment cache is flushed between those two environments being loaded
they could be different object instances representing the same desired
environment. Environment objects define a `==` method but require the
name and modulepath to be the same. If we are running with versioned
environment dirs those modulepaths may be different (ie different
versions of the same environment).
To resolve this race condition we now check the environment names
(Environment#name canoncalizes to symbols to avoid symbol/string
mismatch). The catalog already uses the server specified environment
which, if we are running with versioned environment dirs and have
different versions of the same environment, will be the most up to date
version of the environment.
Puppet.warning_("Requested environment '%{request_env}' did not match server specified environment '%{server_env}'") % {request_env: request.environment.name,server_env: node.environment.name}
0 commit comments