Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1440710

Summary: monkey_patches.rb:104:in `<class:SSLContext>': undefined method `<<' for nil:NilClass (NoMethodError)
Product: [Fedora] Fedora Reporter: Patricia Moeller <patricia.moeller>
Component: puppetAssignee: Dominic Cleal <dominic>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominic, esm, fedora, gchamoul, jose.p.oliveira.oss, k.georgiou, marianne, mastahnke, mmagr, moses, s, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: puppet-4.6.2-4.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-09 19:08:17 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:
Embargoed:

Description Patricia Moeller 2017-04-10 10:36:32 UTC
Description of problem:
I am trying to run puppet 4.6.2-2 standalone in a F26 alpha chroot environment but always got the following error message:

/usr/share/ruby/vendor_ruby/puppet/util/monkey_patches.rb:104:in `<class:SSLContext>': undefined method `<<' for nil:NilClass (NoMethodError)
	from /usr/share/ruby/vendor_ruby/puppet/util/monkey_patches.rb:98:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/ruby/vendor_ruby/puppet/util.rb:16:in `<module:Util>'
	from /usr/share/ruby/vendor_ruby/puppet/util.rb:15:in `<module:Puppet>'
	from /usr/share/ruby/vendor_ruby/puppet/util.rb:14:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/ruby/vendor_ruby/puppet.rb:12:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55: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:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/bin/puppet:4:in `<main>'

Comment 1 Dominic Cleal 2017-04-10 11:19:13 UTC
This looks like an incompatibility of the Puppet monkey patch with Ruby 2.4 when using OpenSSL 1.1.0 or higher.

Ruby 2.4 only sets a default ciphers list of its own on OpenSSL versions older than 1.1 (https://github.com/ruby/ruby/commit/c9dc016#diff-8406e11e4a42f9de6badcd0f6a6c4262R33), so this monkey patch is trying to modify an array that's no longer present.

The Ruby OpenSSL commit (https://github.com/ruby/openssl/commit/b9aea27) that removed it suggest the cipher list in 1.1.0 is secure enough by default, and the list in the commit doesn't list any SSLv2 ciphers, which is what Puppet's trying to disable.

I think the monkey patch could be removed or made conditional in Puppet in Fedora 26+, which uses OpenSSL 1.1.0.

Comment 2 Patricia Moeller 2017-04-10 11:23:25 UTC
Thanks for pointing that out. Sounds like a good idea to me. I just want to confirm that it not only occurs in chroot but also when simply trying to execute it on a F26 box.

Comment 3 Dominic Cleal 2017-04-10 11:26:15 UTC
Already tracked upstream at https://tickets.puppetlabs.com/browse/PUP-7383.

Comment 5 Fedora Update System 2017-05-23 08:41:45 UTC
puppet-4.6.2-4.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b9b66117bb

Comment 6 Fedora Update System 2017-05-23 18:16:18 UTC
puppet-4.6.2-4.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b9b66117bb

Comment 7 Fedora Update System 2017-06-09 19:08:17 UTC
puppet-4.6.2-4.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.