When runing puppet agent, the first puppet agent run fails, but the second goes through.
-We use ENC, and it exports environment. It appears like the ENC was either called after the fail, or for some reason "environment" variable provided by ENC is not used right away.
-We use environments defined in master's puppet conf: [toas_v4_0] modulepath = /etc/puppet/modules/toas/4.0:/etc/puppet/modules/teco/1.4:/etc/puppet/modules/cis:/etc/puppet/modules/external_modules/toas/4.0:/etc/puppet/modules/
-Each environment has it's own module path
-The problem goes away if the node in question (concat) is in default module search path (/etc/puppet/modules), but appears when the module is in environment specific module path
-Puppet 3.8.6 (both master & agent)
-Error: Could not retrieve catalog from remote server: Error 400 on SERVER: $concat_basedir not defined. Try running again with pluginsync=true on the [master] and/or [main] section of your node's '/etc/puppet/puppet.conf'. at /etc/puppet/modules/external_modules/toas/4.0/co ncat/manifests/setup.pp:22 on node 10881-sco-10-0-222-53
-The concat_basedir from error above is a fact coming from concat. Puppet master fails to compile the catalog if the fact is not present, which happens on the first run -> the plugin is just not on the node in the right moment.
How to get rid of this problem properly, and why the second run goes well? Is this a bug in puppet master?