Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1242676 - hiera broken in Fedora 22
hiera broken in Fedora 22
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: hiera (Show other bugs)
22
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Gaël Chamoulaud
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-13 19:06 EDT by Trever Adams
Modified: 2015-11-23 15:58 EST (History)
6 users (show)

See Also:
Fixed In Version: hiera-1.3.4-3.fc22 hiera-3.0.1-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 15:58:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Trever Adams 2015-07-13 19:06:55 EDT
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):
hiera-1.3.4-2.fc22.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Define  /etc/puppet/hiera.yaml:
---
:backends:
  - json
:json:
  :datadir: /etc/puppet/hieradata/
:hierarchy:
  - node/%{::fqdn}
  - virtual/%{::virtual}
  - osfamily/%{osfamily}
  - common

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.
Comment 1 Trever Adams 2015-07-13 19:19:18 EDT
Sorry, I am not sure how I got Fedora 23. It is Fedora 22.
Comment 2 Trever Adams 2015-07-20 19:33:04 EDT
 * Mon May 18 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 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.
Comment 3 Trever Adams 2015-07-20 22:09:16 EDT
Yes, removing that change made everything work. I had to update some of my modules, but everything is fine.
Comment 4 Erik Logtenberg 2015-07-22 09:17:41 EDT
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?
Comment 5 Trever Adams 2015-07-22 09:20:01 EDT
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.)
Comment 6 Erik Logtenberg 2015-07-22 18:36:48 EDT
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.
Comment 7 Erik Logtenberg 2015-07-22 18:39:32 EDT
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).
Comment 8 Fedora Update System 2015-07-30 10:34:04 EDT
hiera-1.3.4-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/hiera-1.3.4-3.fc22
Comment 9 Fedora Update System 2015-07-30 11:03:11 EDT
hiera-1.3.4-4.fc23 has been submitted as an update for Fedora 23.
https://admin.fedoraproject.org/updates/hiera-1.3.4-4.fc23
Comment 10 Fedora Update System 2015-07-30 13:30:24 EDT
Package hiera-1.3.4-4.fc23:
* 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:
https://admin.fedoraproject.org/updates/FEDORA-2015-12386/hiera-1.3.4-4.fc23
then log in and leave karma (feedback).
Comment 11 Fedora Update System 2015-10-07 02:21:57 EDT
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.
Comment 12 Fedora Update System 2015-11-03 05:43:53 EST
hiera-3.0.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2bb4139492
Comment 13 Fedora Update System 2015-11-03 14:53:08 EST
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
Comment 14 Fedora Update System 2015-11-23 15:57:55 EST
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.

Note You need to log in before you can comment on or make changes to this bug.