Bug 1198366

Summary: Puppet fails to run in F22
Product: [Fedora] Fedora Reporter: Erinn Looney-Triggs <erinn.looneytriggs>
Component: puppetAssignee: Jeroen van Meeuwen <vanmeeuwen+fedora>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dcleal, digglife, erik-fedora, fedora, gchamoul, jose.p.oliveira.oss, k.georgiou, lzap, marcus.moeller, marianne, mastahnke, mattwilmott, mmagr, moses, orion, s, terje.rosten, tmz, trever, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: puppet-3.7.5-2.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-21 19:12:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Erinn Looney-Triggs 2015-03-03 22:06:43 UTC
Description of problem:
puppet -help
/usr/share/ruby/vendor_ruby/puppet/defaults.rb:465: warning: duplicated key at line 466 ignored: :queue_type
/usr/share/ruby/vendor_ruby/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError)
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/ruby/vendor_ruby/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in `<module:YAML>'
        from /usr/share/ruby/vendor_ruby/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/ruby/vendor_ruby/puppet/vendor/require_vendored.rb:4:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/ruby/vendor_ruby/puppet/vendor.rb:40:in `require_libs'
        from /usr/share/ruby/vendor_ruby/puppet/vendor.rb:53:in `load_vendored'
        from /usr/share/ruby/vendor_ruby/puppet.rb:172:in `<module:Puppet>'
        from /usr/share/ruby/vendor_ruby/puppet.rb:29:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:12:in `<top (required)>'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/bin/puppet:7:in `<main>'

Version-Release number of selected component (if applicable):

How reproducible:
Run puppet --help

Comment 1 Orion Poplawski 2015-03-04 00:06:31 UTC
Looks like we need to require rubygem-syck?  Although that doesn't fix it.

It also looks like we have some more bundled libraries:

ls lib/puppet/vendor:
load_pathspec.rb  load_safe_yaml.rb  pathspec             rgen       safe_yaml_patches.rb
load_rgen.rb      load_semantic.rb   require_vendored.rb  safe_yaml  semantic

Comment 2 Orion Poplawski 2015-03-04 00:08:20 UTC
hacking out safe_yaml and using rubygem-safe_yaml looks promising so far.

Comment 3 Terje Røsten 2015-03-08 12:28:01 UTC
Thanks Orion! 

By unbundling  safe_yaml and adding reqs on rubygem-syck & rubygem-safe_yaml, puppet works fine.

Comment 4 Orion Poplawski 2015-03-17 03:04:48 UTC
How does this seem?

diff --git a/puppet.spec b/puppet.spec
index 359adef..c55cda2 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -19,7 +19,7 @@

 Name:           puppet
 Version:        3.7.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A network tool for managing many disparate systems
 License:        ASL 2.0
 URL:            http://puppetlabs.com
@@ -47,6 +47,7 @@ Requires:       ruby(release)
 Requires:       ruby(shadow)

 Requires:       rubygem(json)
+Requires:       rubygem(safe_yaml)

 # Prevents jruby from being pulled in by dependencies (BZ #985208)
 Requires:       ruby
@@ -114,6 +115,9 @@ The server can also function as a certificate authority and file server.
 %setup -q
 chmod +x ext/puppet-load.rb ext/regexp_nodes/regexp_nodes.rb
+# Unbundle
+rm -r lib/puppet/vendor/*
+echo "require 'safe_yaml'" > lib/puppet/vendor/require_vendored.rb

 # Nothing to build
@@ -369,6 +373,9 @@ exit 0
 rm -rf %{buildroot}

+* Mon Mar 16 2015 Orion Poplawski <orion.com> - 3.7.1-3
+- Unbundle libs (bug #1198366)
 * Sat Feb 28 2015 Haïkel Guémar <hguemar> - 3.7.1-3
 - Use systemd macros (RHBZ #1197239)

Comment 5 Orion Poplawski 2015-03-17 03:06:42 UTC
*** Bug 1202374 has been marked as a duplicate of this bug. ***

Comment 6 Erik van Pienbroek 2015-03-31 14:22:54 UTC
This change mentioned in comment 4 does resolve the traceback for me, but the duplicated key warning still remains:

$ puppet --version
/usr/share/ruby/vendor_ruby/puppet/defaults.rb:465: warning: duplicated key at line 466 ignored: :queue_type

Comment 7 Orion Poplawski 2015-03-31 19:35:49 UTC
Looks like upstream has some movement on ruby 2.2 support for 3.7 so hopefully that warning will get fixed soon.  In the meantime I've committed this change.

Comment 8 Fedora Update System 2015-03-31 19:39:16 UTC
puppet-3.7.5-2.fc22 has been submitted as an update for Fedora 22.

Comment 9 Erik van Pienbroek 2015-03-31 22:26:39 UTC
The warning can be resolved pretty easily by patching /usr/share/ruby/vendor_ruby/puppet/defaults.rb and removing the duplicate entry from this file (if you open this file in an editor and go to line 465 the duplicate entry can be spotted pretty easily)

Comment 10 Fedora Update System 2015-04-02 01:43:08 UTC
Package puppet-3.7.5-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing puppet-3.7.5-2.fc22'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2015-04-21 19:12:28 UTC
puppet-3.7.5-2.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 Matt Wilmott 2015-05-27 01:53:11 UTC
Warning still exists, dont know if this was designed to fix this though

/usr/share/ruby/vendor_ruby/puppet/defaults.rb:489: warning: duplicated key at line 489 ignored: :queue_type

Different line num though, removed the duplicate dec and it works again in the interim


Comment 13 Zhu Sheng Li 2015-06-06 17:29:12 UTC
still not fixed.

Comment 14 Trever Adams 2015-07-13 23:07:25 UTC
This applies to Fedora 23. It appears there is another bug in Fedora 23 as well: Bug 1242676 which is hiera.

Comment 15 Trever Adams 2015-07-13 23:19:42 UTC
I am sorry, this is Fedora 22 that I meant.