[PUP-9927] PKey.read monkey patch is incompatible with JRuby 9.1 Created: 2019/07/25  Updated: 2019/08/19  Resolved: 2019/08/05

Status: Resolved
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: PUP 6.8.0

Type: Bug Priority: Normal
Reporter: Josh Cooper Assignee: Josh Cooper
Resolution: Fixed Votes: 0
Labels: resolved-issue-added
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template: PUP Bug Template
Team: Coremunity
Sprint: Platform Core KANBAN
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary: Puppet would fail to load under JRuby 9.1, which can occur if puppet-agent 6.4 or greater and puppetserver 6.0.x are installed on the same host.
QA Risk Assessment: Needs Assessment

 Description   

Puppetserver 6.0 uses JRuby 9.1 which is compatible (sort of) with MRI 2.3. However, that version of JRuby doesn't implement OpenSSL::PKey.read so our monkey patch in puppet fails:

$ ruby --version
jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 Java HotSpot(TM) 64-Bit Server VM 25.162-b12 on 1.8.0_162-b12 +jit [darwin-x86_64]
$ git rev-parse HEAD
f292c7ebcfd2b5e0f6696c40ae4f66ed7c053947
$ bx rake parallel;spec
rake aborted!
NameError: undefined method `read' for module `OpenSSL::PKey'
/Users/josh/work/puppet/lib/puppet/util/monkey_patches.rb:104:in `<module:PKey>'
/Users/josh/work/puppet/lib/puppet/util/monkey_patches.rb:103:in `<main>'
/Users/josh/work/puppet/lib/puppet/util.rb:1:in `<module:(root)>'
/Users/josh/work/puppet/lib/puppet/util.rb:17:in `<module:Util>'
/Users/josh/work/puppet/lib/puppet/util.rb:16:in `<main>'
...



 Comments   
Comment by Josh Cooper [ 2019/07/29 ]

Merged to master in https://github.com/puppetlabs/puppet/commit/bf1082993b87778d443d7e0b44b71be9c1b8088c

Comment by Josh Cooper [ 2019/08/05 ]

Passed in 2388ed634739d6f4c733a6900fadcc351e7b4c17

Generated at Wed Jan 22 23:21:41 PST 2020 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.