Jira (PUP-9927) PKey.read monkey patch is incompatible with JRuby 9.1

16 views
Skip to first unread message

Josh Cooper (JIRA)

unread,
Jul 25, 2019, 6:05:03 PM7/25/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Bug PUP-9927
PKey.read monkey patch is incompatible with JRuby 9.1
Change By: Josh Cooper
Sprint: Platform Core KANBAN
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jul 25, 2019, 6:05:03 PM7/25/19
to puppe...@googlegroups.com
Josh Cooper created an issue
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/07/25 3:04 PM
Environment:

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>'
...

Priority: Normal Normal
Reporter: Josh Cooper

Puppet Version:
Puppet Server Version:
OS Name/Version:

Describe your issue in as much detail as possible…
Describe steps to reproduce…

Desired Behavior:

Actual Behavior:

Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

Examples:
Run puppet agent with --test --trace --debug

Relevant sections of /var/log/puppetlabs/puppetserver/puppetserver.log or any applicable logs from the same directory.

For more detailed information turn up the server logs by upping the log level in the server's logback.xml

Relevant sections of configurations files (puppet.conf, hiera.conf, Server's conf.d, defaults/sysconfig)

For memory issues with server heap dumps are also helpful.

Josh Cooper (JIRA)

unread,
Jul 25, 2019, 6:35:03 PM7/25/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 6.8.0

Josh Cooper (JIRA)

unread,
Jul 25, 2019, 6:39:03 PM7/25/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
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.
Release Notes: Bug Fix

Josh Cooper (JIRA)

unread,
Jul 25, 2019, 7:30:03 PM7/25/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Environment:
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:

{noformat}

$ 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>'
...
{noformat}
*Puppet Version 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 : *
*Puppet Server Version
: *
*OS Name/Version:*

Describe your issue
PKey.read}} so our monkey patch in as much detail as possible…
Describe steps to reproduce…

*Desired Behavior
puppet fails : *

{noformat}
*Actual Behavior:* $ ruby --version


Please take a moment and attach any relevant log output and/or manifests
jruby 9 . This will help us immensely when troubleshooting the issue 1 .

Examples:
Run puppet agent with
17.0 (2.3.3) 2018 - 04 - test 20 d8b1ff9 Java HotSpot(TM) 64 - Bit Server VM 25.162 - trace b12 on 1.8.0_162 - b12 +jit [darwin - debug x86_64]
$ git rev-parse HEAD
Relevant sections of {{ f292c7ebcfd2b5e0f6696c40ae4f66ed7c053947

$ bx rake parallel;spec
rake aborted!
NameError: undefined method `read' for module `OpenSSL::PKey'
/ var Users / log josh / puppetlabs work / puppetserver puppet / puppetserver lib/puppet/util/monkey_patches . log}} or any applicable logs from the same directory.

For more detailed information turn up the server logs by upping the log level
rb:104: in the server `<module:PKey> ' s logback.xml

Relevant sections of configurations files (
/Users/josh/work/ puppet /lib/puppet/util/monkey_patches . conf, hiera.conf, Server rb:103:in `<main> ' s conf.d, defaults
/ sysconfig Users/josh/work/puppet/lib/puppet/util.rb:1:in `<module:(root ) >'
/Users/josh/work/puppet/lib/puppet/util.rb:17:in `<module:Util>'
For memory issues with server heap dumps are also helpful /Users/josh/work/puppet/lib/puppet/util . rb:16:in `<main>'
...
{noformat}

Josh Cooper (JIRA)

unread,
Jul 29, 2019, 12:43:03 PM7/29/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jul 29, 2019, 5:49:03 PM7/29/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Aug 5, 2019, 3:14:04 PM8/5/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9927

Passed in 2388ed634739d6f4c733a6900fadcc351e7b4c17

Jean Bond (JIRA)

unread,
Aug 19, 2019, 2:08:03 PM8/19/19
to puppe...@googlegroups.com
Jean Bond updated an issue
 
Change By: Jean Bond
Labels: resolved-issue-added
Reply all
Reply to author
Forward
0 new messages