[PUP-3466] Puppet should warn when it can not read a hiera data file Created: 2014/10/14  Updated: 2019/04/04  Resolved: 2017/05/17

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 3.7.1
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Stack Kororā Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: SELinux, debug, hiera, needs_repro, output, puppet
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL based 6.5 fully updated with the latest from yum.puppetlabs.com for server/client


Template:
QA Contact: Eric Thompson

 Description   

The full journey was described in much greater detail on the Puppet Google Group, but while that would give greater incite into the why, I don't think it adds tremendously to this particular request.

The much shorter version is this: I wanted to learn how to use hiera in my puppet modules. However, I had an /incredibly/ difficult time. I saw weird /weird/ behavior. Some things worked, some things didn't. Many many many Internet searches later, after lots of Puppet Labs documentation, and a desperate cry to the community all led to massive confusion as to what was wrong in my environment. Things worked perfectly via command line with hiera but puppet consistently failed.

Then jcbollinger mentions to check SELinux.

So I ran 'sudo restorecon -RFvv /etc/puppet', restorecon updated a bunch of files in my modules and hiera, and it works!!

I spent ~5hrs happily converting code into using hiera afterwards with no issue.

If at ANY point in time, puppet had mentioned 'I can't read the hiera data files due to permission access' then resolving the SELinux issue would have been a snap. But there was /nothing_at_all/ in the log files that gave any indication that SELinux was the culprit. Thus, I spent a lot of time and effort trying to track down a problem I thought was in heira/puppet. The community then put in time and effort trying to help.

I /really/ wish that puppet was more verbose about what it was doing with heira. When is it trying to read the data file? What variable is it looking for? Ect.

However, I think it is a "must" that puppet should throw an error if it can not read a hiera data file for any reason.



 Comments   
Comment by Rob Reynolds [ 2014/10/28 ]

Hi Stack Kororā, can you provide a link to the google groups conversation? It should be at the bottom of the emails.

Comment by Stack Kororā [ 2014/10/29 ]

Greetings,

Here is the link:
https://groups.google.com/forum/#!topic/puppet-users/JD-4OWT66pM

It is titled "Need help with simple hiera example".

Thanks!
Stack

Comment by Henrik Lindberg [ 2017/05/17 ]

Ping Thomas Hallgren This sounds familiar - was this fixed in hiera 5 ? (I.e. difference between "file not found", and "no permission").

Comment by Thomas Hallgren [ 2017/05/17 ]

I believe this is fixed. We had a similar report with HI-569 appointing the Hiera FileCache as the culprit. It's no longer in use in Hiera 5 unless you use a custom Hiera 3 backend.

Comment by Henrik Lindberg [ 2017/05/17 ]

Since this bug report is for Puppet 3 and it has reached EOL, I am going to close this as we believe the problem to be fixed in Puppet 4.10. If it is possible to reproduce on a Puppet 4.10 please reopen this ticket.

Generated at Sat Dec 14 18:04:17 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.