Red Hat Bugzilla – Bug 1242676
hiera broken in Fedora 22
Last modified: 2015-11-23 15:58:01 EST
Description of problem:
# hiera -c /etc/puppet/hiera.yaml valid.nod
Failed to start Hiera: NoMethodError: undefined method `unsafe_load_file' for Psych:Module
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Define /etc/puppet/hiera.yaml:
2. Try and use hiera
3. The error above
This worked in Fedora 20. I never tried 21. It may be related to bug #1198366 which is still a problem in Fedora 23.
Sorry, I am not sure how I got Fedora 23. It is Fedora 22.
* Mon May 18 2015 Haïkel Guémar <email@example.com> - 1.3.4-2 - Fix errors with Puppet4 (patch from Lukas Bezdicka)
That is from the changelog. It is what is causing the error message. Undoing the change yields a working hiera.
Yes, removing that change made everything work. I had to update some of my modules, but everything is fine.
Same error here. I would like to use hiera with puppet 4 though, so removing the fixes that make it work with puppet 4 doesn't seem to be the right solution for me.
Is there another way to make hiera cli work again?
Erik, would you mind removing them. I believe you will find that it works wonderfully with Puppet 4 (my use for hiera) without them! (You may have to update modules, etc. depending on how strictly you have followed the newer standards. I was using several versions back in the 3.x series as found in F20. I had to update a few things.)
Confirmed, reverting to hiera-1.3.4-1.fc21.noarch does solve the issue I ran into. I couldn't find an already built hiera package for F22 without the patch from comment #2 but the F21 package for hiera appears to work just as well in F22.
By the way, puppet agent still gives a message that concerns the same issue, however in this case it's merely a warning and it works just right. Nontheless, it appears something about this safe/unsafe loading needs fixing.
# puppet agent --onetime --no-daemonize --logdest console
Called 'load_file' without the :safe option -- defaulting to safe mode.
You can avoid this warning in the future by setting the SafeYAML::OPTIONS[:default_mode] option (to :safe or :unsafe).
hiera-1.3.4-3.fc22 has been submitted as an update for Fedora 22.
hiera-1.3.4-4.fc23 has been submitted as an update for Fedora 23.
* should fix your issue,
* was pushed to the Fedora 23 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hiera-1.3.4-4.fc23'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
hiera-1.3.4-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
hiera-3.0.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2bb4139492
hiera-3.0.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update hiera'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-2bb4139492
hiera-3.0.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.