GoogleCloudPlatform / puppet-google-auth

Apache License 2.0
5 stars 11 forks source link

google-gauth not loading from Puppet Agent (from a master compiled manifest) #2

Open nelsonjr opened 6 years ago

nelsonjr commented 6 years ago

Out of the box the module is failing compilation on the master:

Server Error: no parameter named 'provider'

Example:

# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'provider' at /etc/puppetlabs/code/environments/production/modules/graphite/manifests/puppet.pp:13 on Gauth_credential[engine-only] at /etc/puppetlabs/code/environments/production/modules/graphite/manifests/puppet.pp:13 on node puppet.c....
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
nelsonjr commented 6 years ago

credit: originally reported by Sergio Pelissari report: https://groups.google.com/d/msg/puppet-on-gcp-discuss/il1h5H4sZgs/TF4jfAQLAwAJ)

ody commented 6 years ago

Both of the gems, googleauth and google-api-client require gems that through the dependency tree will eventually require Ruby 2.x. The version of JRuby that Puppet Server is currently built with is compatible with Ruby 1.9 so the gems fail to install. Since the gems can't be installed the provider code can't be loaded by the Puppet Server so catalog compilation fails.

Still looking for a workaround.

nelsonjr commented 6 years ago

@ody, I talked to the team that owns these libraries and I was told that:

Ruby 1.9 has been EOL (i.e. no updates, support, or security patches) for a number of years now, and increasing numbers of gems, including our upstream dependencies, are dropping support for it. For this and other reasons related to continued maintainability, we are actively working on removing support for Ruby 1.9 for googleauth and its dependency signet. This is not likely to change, as 1.9 compatibility is actively blocking fixes and security updates for those libraries. (Note that Ruby 2.0 and 2.1 are also officially EOL, but we are maintaining support for them for the time being.) If Puppet Server is running on JRuby 9000 (or later) it should be tracking Ruby 2.x.

What version of JRuby is Puppet Server on?

khaefeli commented 5 years ago

switching to the puppet server jruby 9k helped to solve the issue: https://puppet.com/docs/puppetserver/5.1/configuration.html#enabling-jruby-9k

cyberious commented 5 years ago

That's great news @khaefeli but I know the JRuby 9k breaks hiera-eyaml-gpg at present.

khaefeli commented 5 years ago

@cyberious didn't test it so far with hiera-eyaml-gpg. But I've upgraded puppet to the latest 6.x (master and nodes) and it's working fine (including eyaml, but not tested with hiera-eyaml-gpg):

/opt/puppetlabs/bin/puppetserver ruby --version
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 OpenJDK 64-Bit Server VM 25.171-b11 on 1.8.0_171-8u171-b11-1~bpo8+1-b11 +jit [linux-x86_64]

the most important part: run puppet generate types on the master after deploying the modules. Otherwise you run again into the provider issue. https://tickets.puppetlabs.com/browse/SERVER-94

and I had to install the gem via:

/opt/puppetlabs/puppet/bin/gem install google-api-client --version 0.24.0 --no-ri --no-rdoc

and make sure, no other versions are installed (googleauth 0.6.7 works)