Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
PUP 4.5.3
-
None
-
Night's Watch
-
5
-
NW - 2021-06-30, NW - 2021-07-14, NW - 2021-07-28, NW - 2021-08-11
-
Major
-
4 - 50-90% of Customers
-
3 - Serious
-
4 - $$$$$
-
Similar impact as
PUP-6739
-
Bug Fix
-
Fixes a bug that caused the agent run to fail if the agent requested an environment that didn't exist on the server, even when the classifier was controlling the environment.
Description
The Problem
[root@agent201621-centos ~]# puppet agent -t
|
Info: Using configured environment 'production'
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for agent201621-centos
|
Info: Applying configuration version '1475855527'
|
Notice: Applied catalog in 0.40 seconds
|
|
[root@agent201621-centos ~]# puppet config set environment fake --section agent
|
|
[root@agent201621-centos ~]# puppet agent -t
|
Warning: Unable to fetch my node definition, but the agent run will continue:
|
Warning: Error 400 on SERVER: Could not find environment 'fake'
|
Info: Retrieving pluginfacts
|
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Error 400 on SERVER: Could not find environment 'fake'
|
Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Error 400 on SERVER: Could not find environment 'fake'
|
Info: Retrieving plugin
|
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': Error 400 on SERVER: Could not find environment 'fake'
|
Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Error 400 on SERVER: Could not find environment 'fake'
|
Info: Loading facts
|
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find environment 'fake'
|
Warning: Not using cache on failed catalog
|
Error: Could not retrieve catalog; skipping run
|
Error: Could not send report: Error 400 on SERVER: Could not find environment 'fake'
|
Now if I go ahead and make the environment on the master, it'll compile the catalog against the production environment as expected.
On the master:
[root@master201621-centos ~]# cp -r /etc/puppetlabs/code/environments/production/ /etc/puppetlabs/code/environments/fake
|
Now on the agent:
[root@agent201621-centos ~]# puppet agent -t
|
Notice: Local environment: 'fake' doesn't match server specified node environment 'production', switching agent to 'production'.
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for agent201621-centos
|
Info: Applying configuration version '1475855805'
|
Notice: Applied catalog in 0.36 seconds
|
Expected Behavior
The existence of the environment that the agent sets in puppet.conf should not matter if the ENC is controlling the environment. I expect this message in both cases.
Notice: Local environment: 'fake' doesn't match server specified node environment 'production', switching agent to 'production'.
|
Attachments
Issue Links
- is duplicated by
-
PUP-10682 Puppet run fails when directory for requested env doesn't exist, even if the ENC enforces some other env
-
- Closed
-
-
PUP-7734 puppet.conf bad environment setting breaks ENC correct environment setting
-
- Closed
-
- relates to
-
PUP-6739 Error running puppet with non-existent and non-default environment
-
- Closed
-
-
PUP-9036 Setting the client side environment to one that does not exist on the server causes the catalog to fail compilation
-
- Closed
-
-
PUP-2983 Environment not updated via ENC if obsolete Environment in agents puppet.conf
-
- Closed
-
-
PUP-6048 error running puppet with non existing and non default environment
-
- Closed
-