I was having the following issue: - the node had the correct environment set in puppet.conf - the node was in the right environment in foreman - I ran puppet on the node and in foreman it was moved to the default environment I've noticed that in my setup the /opt/puppetlabs/server/data/puppetserver/yaml/node/$fqdn.yaml is not getting generated (yaml/facts/$fqdn.yaml is there). I don't know why it doesn't get generated but it seems that upgrading to puppet 5 that file stopped being written. As pointed out by gwmngilfen, the above file is used in the classifier script in case the environment is not amongst the facts ( https://github.com/theforeman/puppet-foreman/blob/master/files/external_node_v2.rb#L119-L130 ) Currently the variable `name` which defines the environment is follows ( https://github.com/theforeman/foreman/blob/develop/app/services/puppet_fact_parser.rb#L64 ) <pre> name = facts[:environment] || Setting[:default_puppet_environment] </pre> I have disabled "ENC environment" setting (because I want the agent to be able to specify a different env for testing features). So I'm not sure how the behavior should be in case the setting is enabled but a simple workaround for this would be <pre> name = facts[:environment] || facts[:agent_specified_environment] || Setting[:default_puppet_environment] </pre> I tested the above on 1.15.2 and it works as expected.
Created from redmine issue http://projects.theforeman.org/issues/20378
Upstream bug assigned to None
Note the original description was copied from the upstream tracker, not something I wrote. The script could do a better job here :) Including these cherry picks will allow using an external Puppet 5 server with Satellite 6.3. They will not bring full Puppet 5 compatibility since there are 2 known incompatibilities in the installer and there are no Puppet 5 packages built.
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20378 has been resolved.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. > > > > For information on the advisory, and where to find the updated files, follow the link below. > > > > If the solution does not work for you, open a new bug report. > > > > https://access.redhat.com/errata/RHSA-2018:0336