Project

General

Profile

Actions

Bug #1967

closed

Failed to list certificates: uninitialized constant Module::Puppet

Added by Dmitriy Novitskiy about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have problem with smart-proxy and puppet 3:
OS: Centos 5 i386
puppet: 3.0.1
foreman: 1.0.1-1.el5
foreman-proxy: 1.0.0-3.20121022.el5
after adding smart-proxies i get error: "406 Not Acceptable"
in logs:
E, [2012-11-22T14:30:35.324611 #28312] ERROR -- : Failed to list certificates: uninitialized constant Module::Puppet

Actions #1

Updated by Dominic Cleal about 12 years ago

Could you try editing /usr/share/foreman-proxy/lib/puppetca_api.rb and changing these from line 6? It might give a better indication of the source.

rescue => e
log_halt 406, "Failed to list certificates: #{e}"
end

to

rescue => e
log_halt 406, "Failed to list certificates: #{e}: #{e.backtrace.join("\n")}"
end
Actions #2

Updated by Dmitriy Novitskiy about 12 years ago

E, [2012-11-22T16:44:14.661608 #7848] ERROR -- : Failed to list certificates: uninitialized constant Module::Puppet: /usr/share/foreman-proxy/bin/../lib/proxy/puppetca.rb:103:in `find_puppetca'
/usr/share/foreman-proxy/bin/../lib/proxy/puppetca.rb:65:in `list'
/usr/share/foreman-proxy/bin/../lib/puppetca_api.rb:5:in `GET /puppet/ca'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/showexceptions.rb:24:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/handler/webrick.rb:13:in `run'
/usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:40:in `run!'
/usr/share/foreman-proxy/bin/smart-proxy:44

in 103 line:

    103       if Puppet::PUPPETVERSION.to_i < 3
    104         @puppetca = which("puppetca", default_path) || which("puppet", default_path)
    105       else
    106         @puppetca = which("puppet", default_path)
    107       end

Im applied this patch: https://github.com/skottler/smart-proxy/commit/2594ef59ee5a88bf9da7a1e8c3017845f1b5c3cd

Actions #3

Updated by Dominic Cleal about 12 years ago

Could you try adding require 'puppet' to the top of lib/proxy/puppetca.rb?

Actions #5

Updated by Dmitriy Novitskiy about 12 years ago

Could you try adding require 'puppet' to the top of lib/proxy/puppetca.rb?

help when added after line: module Proxy::PuppetCA
module Proxy::PuppetCA
extend Proxy::Log
extend Proxy::Util
require 'puppet'

When added on top - doest take effect
Thanks!

Actions #6

Updated by Dominic Cleal about 12 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #7

Updated by Ohad Levy about 12 years ago

  • Target version set to 1.1
Actions #8

Updated by Dominic Cleal almost 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF