When I add new nodes to my PE infrastructure, I want to apply use node facts to apply the relevant environment, so that new nodes are seamlessly managed from day one.
|There are architectural issues with the way the agent and server negotiate which environment to use:
- Newly provisioned agent runs will fail if pluginsync occurs in production, but catalog compilation occurs in a different environment, and the manifest references a fact that doesn't exist in production
- Each agent run results in two node requests, and corresponding classifier requests. Facts are not sent with the first node request, so the classifier terminus retrieve last-known facts from puppetdb. Finally, the first node request returns all of the last-known facts back to the agent (since facts are merged into node parameters).
- If the first node request fails or times out due to server load, then the agent will switch back to "production", deleting all its plugins. This leads to a positive feedback loop as agents then download all plugins again, one file at a time.
- If the agent is configured to use an environment in puppet.conf, and the environment is deleted on the server, then the agent will never successfully run again until the setting is removed.