vchepkov
10/04/2023, 7:07 PMMike Weilgart
10/04/2023, 7:07 PMMike Weilgart
10/04/2023, 7:08 PMMike Weilgart
10/04/2023, 7:08 PMvchepkov
10/04/2023, 7:09 PMhbui
10/04/2023, 7:09 PMbastelfreak
10/04/2023, 7:09 PMMike Weilgart
10/04/2023, 7:09 PMMike Weilgart
10/04/2023, 7:09 PMMike Weilgart
10/04/2023, 7:10 PMbastelfreak
10/04/2023, 7:11 PMcsharpsteen
10/04/2023, 7:11 PMbastelfreak
10/04/2023, 7:13 PMcsharpsteen
10/04/2023, 7:13 PMMike Weilgart
10/04/2023, 7:13 PMMike Weilgart
10/04/2023, 7:13 PMvchepkov
10/04/2023, 7:14 PMvchepkov
10/04/2023, 7:15 PMcsharpsteen
10/04/2023, 7:15 PMGET
request for /puppet/v3/node
That request carries no facts as it executes before pluginsync which is before Facter is called up to load facts. So, if your ENC is dependent on facts to put a node in the "right" environment and doesn't have access to a cached source of facts like PuppetDB, then it may give the "wrong" answer to that first request leading to a flip-flop.Mike Weilgart
10/04/2023, 7:15 PMMike Weilgart
10/04/2023, 7:16 PMcsharpsteen
10/04/2023, 7:16 PM/puppet/v3/node
if there was a cached catalog present locally on the agent on the assumption that the environment:
in that catalog will be a much more accurate starting point than whatever an ENC might generate without facts.Mike Weilgart
10/04/2023, 7:17 PMMike Weilgart
10/04/2023, 7:18 PMMike Weilgart
10/04/2023, 7:19 PMMike Weilgart
10/04/2023, 7:21 PMNotice: Local environment: 'production' doesn't match server specified node environment 'development', switching agent to 'development'.
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Notice: Local environment: 'development' doesn't match server specified environment 'test', restarting agent run with environment 'test'
In this sequence, the first "server specified node environment" of "development" is the correct one. The second one is wrong. Somewhere in between the first and the second, because of the steps in between, the ENC changes from saying "development" to saying "test."csharpsteen
10/04/2023, 7:23 PMexternal_nodes
script is the certname of the node:
https://www.puppet.com/docs/puppet/5.5/configuration#external_nodes
So, the answer to whether or not the script pulls in additional sources of info when making a decision lies within the script its self.Mike Weilgart
10/04/2023, 7:24 PMbastelfreak
10/04/2023, 7:26 PMcsharpsteen
10/04/2023, 7:26 PM