Issue #19396 has been updated by David K.
Hi Eric,
2.7 has this:
<pre>
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -38,6 +38,9 @@ class Puppet::Network::Client::Master <
Puppet::Network::Client
# in their manifests
facts["clientversion"] = Puppet.version.to_s
+ # And add our environment as a fact.
+ facts["environment"] = Puppet[:environment]
+
facts
end
</pre>
3.1 just has:
<pre>
def add_local_facts
values["clientcert"] = Puppet.settings[:certname]
values["clientversion"] = Puppet.version.to_s
end
</pre>
I simply added
<pre>
values["environment"] = Puppet[:environment]
</pre>
to this, and everything works as expected now!
----------------------------------------
Bug #19396: Wrong environment being saved in yaml/database when using
storeconfigs
https://projects.puppetlabs.com/issues/19396#change-83719
Author: David K
Status: Investigating
Priority: Normal
Assignee: eric sorenson
Category:
Target version:
Affected Puppet version: 3.1.0
Keywords: yaml environment mysql activerecord
Branch:
Using puppet 3.1 with multiple static environments and:
reports = store
storeconfigs = true
thin_storeconfigs = true
results in the wrong environment being stored in the mysql database as well as
/var/lib/puppet/yaml/node/host.yaml file. The environment in the yaml file
actually changes from the proper environment to the wrong one during the run.
The yaml file and database use whatever the masters default environment = is
set to under the [master] section - I can make them save whatever value I want.
/var/lib/puppet/reports/host/####.yaml contains the correct environment name.
If I disable storeconfigs the /var/lib/puppet/yaml/node is correct.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.