Jira (HI-539) Hierarchies are being ignored

2016-10-13 Thread Thomas Hallgren (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Thomas Hallgren commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Tom De Vylder, the behavior above would be exactly what you get if you have a global hiera.yaml that uses interpolation of % {environmentpath} 
 to find data in the environiment. Are you 100% sure that isn't the case? I'm certain that the environment data provider is never consulted. If it was, that would have shown in the explain output as "Data Provider "Hiera Data Provider, version 4". That's regardless of if it finds the key or not. But it doesn't go beyond the global "Hiera" at the top. The key is found there. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-13 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
To rule out the lookup CLI, can you try with a manifest and using puppet apply? I would like to see what a notice hiera(key) does in your case (since that uses only your global hiera configuration). Then try with a notice lookup(key) which uses both the global hiera, env, and modules. 
If you are certain there is nothing for the key in global hiera, and it does not continue with env, or a module - then there must be something wrong with the configuration (or that it uses an environment other than the one where you have the configuration) as it does not seem to take effect. 
You may also want to hop onto Slack or IRC and get interactive help from the community as that may help you resolve the issues faster. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-13 Thread Tom De Vylder (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Tom De Vylder commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
The particular data I was testing with is stored in $ {environment} 
/hieradata only. It shouldn't match in global Hiera nor in modules. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-13 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Thomas pointed out that the explain is telling us that it finds the value using the global hierarchy in hiera. Lookup is designed that way - using priority lookup (as is the case here) if a value is found in hiera that value is used and it never continues into the env or module data providers. Thus, you must ensure that the value is not found there - see class hiera as an override over all other data - there is no merge of all hierarchical levels in the three tiers; global, env, module - they can have their own hierarchy and they do not blend. 
The --node is an option designed to provide lookup from the perspective of that node (what is known about it). If you don't want that, the values must be provided via the --facts option 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-13 Thread Tom De Vylder (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Tom De Vylder commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Apparently it makes a rather big difference whether or not the value of "--node" is known to Puppet. I've been testing mostly with just 'node01' instead of an actual hostname because it's just way faster to run 'puppet lookup' than it is to have an agent run. And typing 'node01' requires less keystrokes than an actual hostname. 
Even though I wasn't using anything that matches $trusted.certname it still wouldn't find very generic data in f.i. hieradata/common.yaml. Whether or not the node is known to Puppet it should still match fall-back hierarchies. Or throw an error. So I think that part is a bug. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Hm, that is really a general problem when you want to migrate some environments... You need to interpolate the environment name in the global hiera in all paths to ensure that you get an empty set of files there (or naturally only such files/values that you want as overrides). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Thomas Hallgren (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Thomas Hallgren commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
This is what the explain output would look like if it didn't find it in the global hiera: 
 
 
 
 
 
 
Merge strategy first 
 
 
 
 
  Data Binding "hiera" 
 
 
 
 
No such key: "virt" 
 
 
 
 
  Data Provider "Hiera Data Provider, version 4" 
 
 
 
 
ConfigurationPath "/etc/puppetlabs/code/environments/production/hiera.yaml" 
 
 
 
 
Data Provider "Virtual" 
 
 
 
 
  Path "/etc/puppetlabs/code/environments/production/hieradata/virtual/virtualbox.yaml" 
 
 
 
 
Original path: "virtual/%{virtual}" 
 
 
 
 
Found key: "virt" value: "virtual/virtualbox" 
 
 
 
 
  Merged result: "virtual/virtualbox"
 
 
 
  

Jira (HI-539) Hierarchies are being ignored

2016-10-12 Thread Thomas Hallgren (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Thomas Hallgren commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
I think the problem is that it finds the key in the global hiera and then doesn't bother to continue the search. Global scope has top prio. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Also, Tom De Vylder does it work if you do a lookup in a manifest and notice the result using puppet apply? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Wonder if there is an issue with the CLI lookup not using the expected environment. Is 'node01' in your environment in an environment that has the provider turned on? You may have to set --environment as well to the environment you want to use. Does that make a difference? 
Thomas Hallgren - any thoughts? 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Tom De Vylder (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Tom De Vylder commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
Individual environments in my case, it's indeed set to 'environment_data_provider = hiera'. 
I have a mix of old hiera_*() and lookup() functions thought the code. As long as I don't need anything other than common.yaml or nodes/$node.yaml things work just as expected. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg assigned an issue to Tom De Vylder 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Hiera /  HI-539 
 
 
 
  Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 

Change By:
 
 Henrik Lindberg 
 
 
 

Assignee:
 
 Tom De Vylder 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  HI-539 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 
 
did you opt in to using lookup in your environment? If not, then you only get lookups from the global hiera just what I think the "explain" shows. That is: Set environment_data_provider = hiera in puppet.conf, or in Individual environments in environment.conf. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 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 (HI-539) Hierarchies are being ignored

2016-10-12 Thread Tom De Vylder (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Tom De Vylder created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Hiera /  HI-539 
 
 
 
  Hierarchies are being ignored  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 HI 3.2.1 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2016/10/12 4:25 AM 
 
 
 

Environment:
 
 
Ubuntu 16.04 Puppetserver 2.6.0 Puppet-agent 1.6.2 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Tom De Vylder 
 
 
 
 
 
 
 
 
 
 
Please consider the snippets below. 
cat /etc/puppetlabs/code/environments/production/hiera.yaml 
 
 
 
 
 
 
--- 
 
 
 
 
version: 4