# Agent using puppet.conf defined environment over ENC provided one when the agent specified environment doesn't exist?

We use a custom ENC to integrate with GLPI and provide our agents with environment, roles, and any parameter overrides. The class we have managing the agent's Puppet configuration writes this environment to puppet.conf so that in the situation where the ENC isn't able to return a value (say GLPI was unavailable) then it'll still be able to operate with just the Puppet Master.

We've just removed an old environment within our deployment and updated the assigned nodes on GLPI to point to another. During the next check-in the agents returned that they couldn't find the environment and failing. The ENC is returning the correct, updated environment name.

I thought that the ENC's values always trumped any agent config, and this has worked before when we've moved systems between environments which exist. I assume that this is a problem because the environment has been removed.

Is there any way to resolve this without having to complete manual agent runs on each of the systems? We're using a non-PE setup so using MCO isn't an option, but it seems a little strange that this issue can happen when the ENC is supposed to trump all local config.

edit retag close merge delete

Sort by » oldest newest most voted

Looks like this is an outstanding issue (PUP2983). It seems that the master validates the environment before the ENC is called. The ticket is part of an epic to improve agent interactions so it should be improved in the future.

more