Jira (PUP-6248) puppet agent generates error when used with --logdest

2016-04-30 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-6248 
 
 
 
  puppet agent generates error when used with --logdest  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 4.3.2 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2016/04/29 8:23 AM 
 
 
 

Environment:
 
 
RHEL 7.2 puppet 4.3.2 (puppet-agent-1.3.5)  AND puppet 4.4.2 (puppet-agent-1.4.2) 
no puppet user or group on managed nodes. 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Frank Ederveen 
 
 
 
 
 
 
 
 
 
 
 

id uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
 
 
 

puppet apply --logdest /tmp/foo.json -e 'notify {"jenny I got your number":} 
'
 

cat /tmp/foo.json [ {"level":"err","message":"Unable to set ownership to puppet:puppet for log file: 

Jira (HI-421) Hiera should support filters/whitelists for backends

2015-08-04 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen commented on  HI-421 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 
 
Thanks Henrik, good idea. 
This makes it much easier to make changes. I started implementing a wrapper backend with filtering options. Stay tuned! 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (HI-421) Hiera should support filters/whitelists for backends

2015-08-04 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen assigned an issue to Frank Ederveen 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-421 
 
 
 
  Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 

Change By:
 
 Frank Ederveen 
 
 
 

Assignee:
 
 FrankEderveen 
 
 
 

Priority:
 
 Normal Trivial 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (HI-421) Hiera should support filters/whitelists for backends

2015-07-31 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-421 
 
 
 
  Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 

Change By:
 
 Frank Ederveen 
 
 
 
 
 
 
 
 
 
 Somebackendlookupscanbequiteexpensive.Itwouldbemostusefultohavetheoptionofaddingawhitelistofkeyswithabackend.WhenusingadatabaseasbackendtolookupENC-likedatafornodes,itwillgetlotsofrequests;mostofwhichwillbeirrelevantforthatbackend(ntp::package_nameforexample).Inourtestingwehaveseencataloguecompiletimesdropfrom~65to~12seconds.Examplehiera.yamlentry:{noformat}:foreman::url:...:whitelist:-puppetmaster-environment-patchrelease-role{noformat}Thiscanalsobeagoodwaytopreventsomeonefromsetting'root_password'inENCand this thus gettingaccesstoanode.Hereisabitofcodethatworksforus:{noformat}---a/lib/hiera/backend.rb+++b/lib/hiera/backend.rb@@-258,11+258,16@@classHierafound=falseConfig[:backends].eachdo|backend|+whitelist=Config[backend.to_sym][:whitelist]backend_constant=#{backend.capitalize}_backendifconstants.include?(backend_constant)||constants.include?(backend_constant.to_sym)backend=(@backends[backend]||=find_backend(backend_constant))found_in_backend=falsenew_answer=catch(:no_such_key)do+ifdefined?(whitelist)andwhitelist.is_a?(Array)andwhitelist.size0andnotwhitelist.include?(key)+Hiera.debug(Skippingas#{key.inspect}isnotonwhitelist:#{whitelist.inspect})+throw:no_such_key+endvalue=backend.lookup(segments[0],scope,order_override,resolution_type,context)value=qualified_lookup(subsegments,value)unlesssubsegments.nil?found_in_backend=true{noformat} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You 

Jira (HI-421) Hiera should support filters/whitelists for backends

2015-07-31 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen created an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-421 
 
 
 
  Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  New Feature 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Components:
 

 Community 
 
 
 

Created:
 

 2015/07/31 3:45 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Frank Ederveen 
 
 
 
 
 
 
 
 
 
 
Some backend lookups can be quite expensive. It would be most useful to have the option of adding a whitelist of keys with a backend. 
When using a database as backend to look up ENC-like data for nodes, it will get lots of requests; most of which will be irrelevant for that backend (ntp::package_name for example). 
In our testing we have seen catalogue compile times drop from ~65 to ~12 seconds. 
Example hiera.yaml entry: 
{{:foreman: :url: ... :whitelist: 
 

puppetmaster
 

environment
 

patchrelease
 

role}}
 
 
This can 

Jira (HI-421) Hiera should support filters/whitelists for backends

2015-07-31 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-421 
 
 
 
  Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 

Change By:
 
 Frank Ederveen 
 
 
 
 
 
 
 
 
 
 Somebackendlookupscanbequiteexpensive.Itwouldbemostusefultohavetheoptionofaddingawhitelistofkeyswithabackend.WhenusingadatabaseasbackendtolookupENC-likedatafornodes,itwillgetlotsofrequests;mostofwhichwillbeirrelevantforthatbackend(ntp::package_nameforexample).Inourtestingwehaveseencataloguecompiletimesdropfrom~65to~12seconds.Examplehiera.yamlentry:{noformat}:foreman::url:...:whitelist:-puppetmaster-environment-patchrelease-role{noformat}Thiscanalsobeagoodwaytopreventsomeonefromsetting'root_password'inENCandthisgettingaccesstoanode.Hereisabitofcodethatworksforus: {noformat} ---a/lib/hiera/backend.rb+++b/lib/hiera/backend.rb@@-258,11+258,16@@classHierafound=falseConfig[:backends].eachdo|backend|+whitelist=Config[backend.to_sym][:whitelist]backend_constant=#{backend.capitalize}_backendifconstants.include?(backend_constant)||constants.include?(backend_constant.to_sym)backend=(@backends[backend]||=find_backend(backend_constant))found_in_backend=falsenew_answer=catch(:no_such_key)do+ifdefined?(whitelist)andwhitelist.is_a?(Array)andwhitelist.size0andnotwhitelist.include?(key)+Hiera.debug(Skippingas#{key.inspect}isnotonwhitelist:#{whitelist.inspect})+throw:no_such_key+endvalue=backend.lookup(segments[0],scope,order_override,resolution_type,context)value=qualified_lookup(subsegments,value)unlesssubsegments.nil?found_in_backend=true {noformat} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received 

Jira (HI-421) Hiera should support filters/whitelists for backends

2015-07-31 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-421 
 
 
 
  Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 

Change By:
 
 Frank Ederveen 
 
 
 
 
 
 
 
 
 
 Somebackendlookupscanbequiteexpensive.Itwouldbemostusefultohavetheoptionofaddingawhitelistofkeyswithabackend.WhenusingadatabaseasbackendtolookupENC-likedatafornodes,itwillgetlotsofrequests;mostofwhichwillbeirrelevantforthatbackend(ntp::package_nameforexample).Inourtestingwehaveseencataloguecompiletimesdropfrom~65to~12seconds.Examplehiera.yamlentry: {noformat} :foreman::url:...:whitelist:-puppetmaster-environment-patchrelease-role {noformat}   Thiscanalsobeagoodwaytopreventsomeonefromsetting'root_password'inENCandthisgettingaccesstoanode.Hereisabitofcodethatworksforus:---a/lib/hiera/backend.rb+++b/lib/hiera/backend.rb@@-258,11+258,16@@classHierafound=falseConfig[:backends].eachdo|backend|+whitelist=Config[backend.to_sym][:whitelist]backend_constant=#{backend.capitalize}_backendifconstants.include?(backend_constant)||constants.include?(backend_constant.to_sym)backend=(@backends[backend]||=find_backend(backend_constant))found_in_backend=falsenew_answer=catch(:no_such_key)do+ifdefined?(whitelist)andwhitelist.is_a?(Array)andwhitelist.size0andnotwhitelist.include?(key)+Hiera.debug(Skippingas#{key.inspect}isnotonwhitelist:#{whitelist.inspect})+throw:no_such_key+endvalue=backend.lookup(segments[0],scope,order_override,resolution_type,context)value=qualified_lookup(subsegments,value)unlesssubsegments.nil?found_in_backend=true 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message 

Jira (HI-46) Hiera should support alternate environments

2015-07-31 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen commented on  HI-46 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Hiera should support alternate environments  
 
 
 
 
 
 
 
 
 
 
Hi, it seems to me that there might be two different requests/issues here. 
1) different hiera.yaml for each environment 2) one hiera, looking for data in different environments 
In my company we use environments as 'puppet+hiera' versions. For example 1_2_3, 1_3_1. Once a version/environment has been released it is never changed anymore. In our ENC; each server has an version/environment which is managed in puppet.conf. 
This is pretty much a requirement for companies which require very strict change control; for example financial services. 
For this scenario, having one shared hiera.yaml is not so good. Changes to backends or the hierarchy will affect already released environments. 
Thanks, Frank 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (HI-421) Hiera should support filters/whitelists for backends

2015-07-31 Thread Frank Ederveen (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Frank Ederveen updated an issue 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 Hiera /  HI-421 
 
 
 
  Hiera should support filters/whitelists for backends  
 
 
 
 
 
 
 
 
 

Change By:
 
 Frank Ederveen 
 
 
 
 
 
 
 
 
 
 Somebackendlookupscanbequiteexpensive.Itwouldbemostusefultohavetheoptionofaddingawhitelistofkeyswithabackend.WhenusingadatabaseasbackendtolookupENC-likedatafornodes,itwillgetlotsofrequests;mostofwhichwillbeirrelevantforthatbackend(ntp::package_nameforexample).Inourtestingwehaveseencataloguecompiletimesdropfrom~65to~12seconds.Examplehiera.yamlentry: {{ :foreman::url:...:whitelist:-puppetmaster-environment-patchrelease-role }} Thiscanalsobeagoodwaytopreventsomeonefromsetting'root_password'inENCandthisgettingaccesstoanode.Hereisabitofcodethatworksforus: {{ ---a/lib/hiera/backend.rb+++b/lib/hiera/backend.rb@@-258,11+258,16@@classHierafound=falseConfig[:backends].eachdo|backend|+whitelist=Config[backend.to_sym][:whitelist]backend_constant=#{backend.capitalize}_backendifconstants.include?(backend_constant)||constants.include?(backend_constant.to_sym)backend=(@backends[backend]||=find_backend(backend_constant))found_in_backend=falsenew_answer=catch(:no_such_key)do+ifdefined?(whitelist)andwhitelist.is_a?(Array)andwhitelist.size0andnotwhitelist.include?(key)+Hiera.debug(Skippingas#{key.inspect}isnotonwhitelist:#{whitelist.inspect})+throw:no_such_key+endvalue=backend.lookup(segments[0],scope,order_override,resolution_type,context)value=qualified_lookup(subsegments,value)unlesssubsegments.nil?found_in_backend=true }}  
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are