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

puppet 7: Could not find a suitable provider for foreman_smartproxy #639

Closed
TheMeier opened this issue Dec 30, 2020 · 5 comments
Closed

Comments

@TheMeier
Copy link

Just upgraded to puppet 7 and had to set foreman_proxy::register_in_foreman to false otherwise an erro occurs:

Could not find a suitable provider for foreman_smartproxy

@ekohl
Copy link
Member

ekohl commented Dec 30, 2020

The oauth2 gem is required. I'm guessing you need to reinstall that in the AIO Puppet environment since it was upgraded from Ruby 2.5 to Ruby 2.7 so some install paths may have changed. We had the same thing with Puppet 5 to 6 (2.4 to 2.5).

@TheMeier
Copy link
Author

Thanks @ekohl could you please elaborate. Where is this gem needed? On the puppetserver or the agent?

@TheMeier
Copy link
Author

Ok found it sudo yum reinstall puppet-agent-oauth on the agent fixed it. The gem logs some warnings though:

/opt/puppetlabs/puppet/cache/lib/puppet/provider/foreman_resource/rest_v3.rb:62: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/cache/lib/puppet/provider/foreman_resource/rest_v3.rb:62: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete
/opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/oauth-0.5.1/lib/oauth/helper.rb:12: warning: URI.escape is obsolete

@ekohl
Copy link
Member

ekohl commented Dec 31, 2020

That is indeed what I meant. It looks like we're not on the latest version (0.5.4), but that's already 3 years old. Doesn't look like they fixed the warning there.

https://github.com/theforeman/puppet-foreman/blob/c3c090ce8645a3f3da9cf7290ac13cab1503d8c6/lib/puppet/provider/foreman_resource/rest_v3.rb#L62 does look easy to fix. There it should really use CGI.escape instead of URI.escape.

@ekohl
Copy link
Member

ekohl commented Dec 31, 2020

theforeman/puppet-foreman#911 should do that. If you have the time, please test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants