-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PUP-11328) Get the environment's name without loading the environment
The previous commit added back the node request as a fallback, but it was calling `Node#environment`, which will try to load the environment from disk. Since the server-assigned environment likely doesn't exist on the agent, the run printed the following warning and continued using "production" Warning: Could not find a directory environment named 'xxx' anywhere in the path ... Does the directory exist? To complicate matters, node termini set the environment on the node differently. The :rest terminus returns a node with an environment_name, but not an instance. The :plain terminus returns a node with an environment instance, but not an environment_name. To avoid breaking things, retrieve the environment name the same way we did before[1]. [1] https://github.com/puppetlabs/puppet/blob/6.24.0/lib/puppet/configurer.rb#L315-L319
- Loading branch information
1 parent
f0214e6
commit 7a5e454
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters