Jira (PUP-5740) lookup does not honor environment.conf setting 'environment_data_provider = "function"'
Title: Message Title Sean Griffin assigned an issue to Unassigned Puppet / PUP-5740 lookup does not honor environment.conf setting 'environment_data_provider = "function"' Change By: Sean Griffin Assignee: Sean Griffin Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5740) lookup does not honor environment.conf setting 'environment_data_provider = "function"'
Title: Message Title Henrik Lindberg assigned an issue to Sean Griffin Puppet / PUP-5740 lookup does not honor environment.conf setting 'environment_data_provider = "function"' Change By: Henrik Lindberg Assignee: Sean Griffin Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5740) lookup does not honor environment.conf setting 'environment_data_provider = "function"'
Title: Message Title Henrik Lindberg commented on PUP-5740 Re: lookup does not honor environment.conf setting 'environment_data_provider = "function"' It is correct that values bound in hiera should have higher precedence than environment. Hiera is considered to be global. If we did not do it that way, it would cause lots of pain. The order is: hiera environment data provider (if there is one) module - if the key is in a namespace, and the name corresponds to a module, and that module has a data provider I think that means that this is not an error. But want to be sure before closing. Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5740) lookup does not honor environment.conf setting 'environment_data_provider = "function"'
Title: Message Title Sean Griffin updated an issue Puppet / PUP-5740 lookup does not honor environment.conf setting 'environment_data_provider = "function"' Change By: Sean Griffin Setting{code}environment_data_provider = "function"{code}in $config_dir/environments/production/environment.conf should direct puppet lookup to find the value for a key in the hash returned by $config_dir/environments/production/lib/puppet/functions/environment/data.rb.Instead, puppet lookup prefers to return the value found by hiera, and will use data.rb only if the key is not found in hiera.To reproduce:1. apply the attached catalog manifest .2. execute 'puppet lookup production_key'.3. observe the value looked up is from hiera.{code}[root@t17ic0vd14jnf0a hieradata]# puppet lookup production_key--- env-production-hiera provided data...[root@t17ic0vd14jnf0a hieradata]#{code}The manifest installs:1. this data.rb file in /etc/puppetlabs/code/environments/production/lib/puppet/functions/environment/{code}Puppet::Functions.create_function(:'environment::data') do def data(){ 'production_key' => 'env-production-ruby-function data() provided value', 'production_data_key' => 'env-production-ruby-function data () provided value',} endend{code}2. this environment.conf in /etc/puppetlabs/code/environments/production{code}environment_timeout = 0environment_data_provider = function# environment_data_provider = "hiera"{code}3. This hiera.yaml /etc/puppetlabs/code{code}--- :backends:- "yaml" :logger: "console" :hierarchy:- "%{environment}"- "../../../hieradata/global" :yaml::datadir: "/etc/puppetlabs/code/environments/%{environment}/hieradata"{code}4. this production.yaml file in /etc/puppetlabs/code/environments/production/hieradata{code}--- production_key: "env-production-hiera provided data"{code} Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Jira (PUP-5740) lookup does not honor environment.conf setting 'environment_data_provider = "function"'
Title: Message Title Sean Griffin updated an issue Puppet / PUP-5740 lookup does not honor environment.conf setting 'environment_data_provider = "function"' Change By: Sean Griffin Attachment: pup-5740-manifest Add Comment This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc) -- 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 puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-5740) lookup does not honor environment.conf setting 'environment_data_provider = "function"'
Title: Message Title Sean Griffin created an issue Puppet / PUP-5740 lookup does not honor environment.conf setting 'environment_data_provider = "function"' Issue Type: Bug Assignee: Unassigned Created: 2016/01/21 5:17 PM Priority: Normal Reporter: Sean Griffin Setting environment_data_provider = "function" in $config_dir/environments/production/environment.conf should direct puppet lookup to find the value for a key in the hash returned by $config_dir/environments/production/lib/puppet/functions/environment/data.rb. Instead, puppet lookup prefers to return the value found by hiera, and will use data.rb only if the key is not found in hiera. To reproduce: 1. apply the attached catalog. 2. execute 'puppet lookup production_key'. 3. observe the value looked up is from hiera. [root@t17ic0vd14jnf0a hiera