Bug 1242676 - hiera broken in Fedora 22
Summary: hiera broken in Fedora 22
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hiera   
(Show other bugs)
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Gaël Chamoulaud
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Reopened
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-13 23:06 UTC by Trever Adams
Modified: 2015-11-23 20:58 UTC (History)
6 users (show)

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 20:58:01 UTC
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)

Description Trever Adams 2015-07-13 23:06:55 UTC
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 23:19:18 UTC
Sorry, I am not sure how I got Fedora 23. It is Fedora 22.

Comment 2 Trever Adams 2015-07-20 23:33:04 UTC
 * 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-21 02:09:16 UTC
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 13:17:41 UTC
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 13:20:01 UTC
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 22:36:48 UTC
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 22:39:32 UTC
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 14:34:04 UTC
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 15:03:11 UTC
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 17:30:24 UTC
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 06:21:57 UTC
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 10:43:53 UTC
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 19:53:08 UTC
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 20:57:55 UTC
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.