Issue #19396 has been updated by David K.

Scratch that - half fixed.
The yaml files show the correct info now.
The DB still gets production - so I am still using a DB trigger to change it to 
what it should be based on the fact.

<pre>create trigger update_environment before update on hosts for each row set 
NEW.environment = (SELECT env FROM ( SELECT hosts.name AS hostname, 
fact_values.value AS env FROM fact_names JOIN fact_values ON 
fact_values.fact_name_id = fact_names.id JOIN hosts ON hosts.id = 
fact_values.host_id WHERE fact_names.name = 'environment' ) environment where 
hostname = NEW.name);</pre>
----------------------------------------
Bug #19396: Wrong environment being saved in yaml/database when using 
storeconfigs
https://projects.puppetlabs.com/issues/19396#change-83720

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.


Reply via email to