Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins fail to apply with jruby 1.7 #922

Closed
ctrox opened this issue Mar 6, 2018 · 3 comments
Closed

Plugins fail to apply with jruby 1.7 #922

ctrox opened this issue Mar 6, 2018 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@ctrox
Copy link

ctrox commented Mar 6, 2018

  • Module version: 6.2.1
  • Puppet version: 5.4
  • OS and version: Ubuntu 16.04

Bug description

Since version 6.2.1 it looks like the elastic_plugin provider is using %i[] which is not supported on jruby 1.7.x according to this.

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/elasticsearch_plugin: Could not autoload puppet/provider/elasticsearch_plugin/plugin: /home/puppetcode/environments/production/upstream/elasticsearch/lib/puppet/provider/elastic_plugin.rb:110: unknown type of %string
      %i[host port user password].map do |param|
        ^ (file: /home/puppetcode/environments/production/upstream/elasticsearch/manifests/plugin.pp, line: 134, column: 3) (file: /home/puppetcode/environments/production/services/s_elasticsearch/manifests/plugins/migration.pp, line: 13) on node certname.nine.ch
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
@fschaer
Copy link

fschaer commented Mar 7, 2018

Same issue for me, puppet5 opensource

Workaround for this lies here :
https://github.com/elastic/puppet-elasticsearch/blob/30763415b13b12061eb03570a7748464c1ebeb11/lib/puppet/provider/elastic_plugin.rb#L110

replace with :

[:host , :port , :user , :password].map do |param|

@tylerjl tylerjl added the bug Something isn't working label Mar 8, 2018
@tylerjl
Copy link
Contributor

tylerjl commented Mar 8, 2018

This was definitely a surprise, I was under the assumption that deprecating Puppet 3.x implied moving to Ruby 2.x wholesale but it does indeed seem that Puppet Server leverages JRuby 1.7, so we will need to continue to support Ruby 1.9.x across the board.

Thank you very much for the reports @ctrox and @fschaer, I'm going through the process of setting up failing tests to ensure that I can catch every instance that may cause problems like this and verifiably ensure that the problem is solved and will continue to be caught with tests in the future.

@tylerjl
Copy link
Contributor

tylerjl commented Mar 13, 2018

This went out in the 6.2.2 release.

@tylerjl tylerjl added this to the 6.2.2 milestone Mar 13, 2018
@tylerjl tylerjl closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants