Project

General

Profile

Bug #1556

Updated by Dominic Cleal about 11 years ago

Hello, 

 

 I am using following foreman and foreman-proxy versions: 

 

 foreman: pre-0.5 (last git commit: dda8e2b951d52a5bfff13317f0b34a9a3c479574) 
 
 foreman-proxy: last git commit (aa0a791aa817b0a6a911fa3abe3341a3967dd698) 

 

 I tried to generate puppet class documentation according to http://theforeman.org/projects/foreman/wiki/Puppet_class_browser 
 
 It fails with the trace output: 

 

 <pre> 
 
 ** Invoke puppet:rdoc:generate (first_time) 
 
 ** Invoke environment (first_time) 
 
 ** Execute environment 
 
 ** Invoke puppet:rdoc:prepare (first_time) 
 
 ** Invoke environment  
  
 ** Execute puppet:rdoc:prepare 
 
 ** Execute puppet:rdoc:generate 
 
 rake aborted! 
 
 undefined method `id2name' for "testing":String 
 
 /opt/foreman/app/models/puppetclass.rb:83:in `rdoc' 
 
 /opt/foreman/app/models/puppetclass.rb:79:in `each' 
 
 /opt/foreman/app/models/puppetclass.rb:79:in `rdoc' 
 
 /opt/foreman/lib/tasks/puppet.rake:17 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain' 
 
 /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' 
 
 /opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/bin/rake:33 
 
 /opt/foreman/vendor/ruby/1.8/bin/rake:19:in `load' 
 
 /opt/foreman/vendor/ruby/1.8/bin/rake:19 
 
 Tasks: TOP => puppet:rdoc:generate 
 
 </pre> 

 

 I suspected that env is a simple string in puppetclass.rb on line 83, so id2name method doesn't belong there. Tried to remove it - no more complains about it and output path for puppetdoc appears to be correct. Yet generation fails with another problems: 

 

 <pre> 
 
 ** Invoke puppet:rdoc:generate (first_time) 
 
 ** Invoke environment (first_time) 
 
 ** Execute environment 
 
 ** Invoke puppet:rdoc:prepare (first_time) 
 
 ** Invoke environment  
  
 ** Execute puppet:rdoc:prepare 
 
 ** Execute puppet:rdoc:generate 
 
 *********Proccessing environment devel ************* 
 
 puppetdoc --output /opt/foreman/public/puppet/rdoc/devel --modulepath xinetd::paramsxinetd::configxinetdnetwork::paramsnetwork::confignetworksudo::paramssudo::configsudouserssnmp::paramssnmp::configsnmpssh::paramsssh::configsshmunin::node::paramsmunin::node::configmunin::nodemunin::node::paramsmunin::master::configmunin::mastermuninamanda::paramsamanda::configamandantp::paramsntp::configntpbase::snmpbase::amandabase::muninbase::networkbase::sshbase::ntpbase::usersbase::sudobase -m rdoc 
 
 puppetdoc --output /opt/foreman/public/puppet/rdoc/devel --modulepath xinetd::paramsxinetd::configxinetdnetwork::paramsnetwork::confignetworksudo::paramssudo::configsudouserssnmp::paramssnmp::configsnmpssh::paramsssh::configsshmunin::node::paramsmunin::node::configmunin::nodemunin::node::paramsmunin::master::configmunin::mastermuninamanda::paramsamanda::configamandantp::paramsntp::configntpbase::snmpbase::amandabase::muninbase::networkbase::sshbase::ntpbase::usersbase::sudobase -m rdoc 
 
 RDoc::RDocError is deprecated and will be removed in RDoc 4 
 
 Could not generate documentation: uninitialized constant RDoc::RDoc::Generator 
 
 Failed to process puppetdocs for /opt/foreman/public/puppet/rdoc/devel while executing puppetdoc --output /opt/foreman/public/puppet/rdoc/devel --modulepath xinetd::paramsxinetd::configxinetdnetwork::paramsnetwork::confignetworksudo::paramssudo::configsudouserssnmp::paramssnmp::configsnmpssh::paramsssh::configsshmunin::node::paramsmunin::node::configmunin::nodemunin::node::paramsmunin::master::configmunin::mastermuninamanda::paramsamanda::configamandantp::paramsntp::configntpbase::snmpbase::amandabase::muninbase::networkbase::sshbase::ntpbase::usersbase::sudobase -m rdoc 
 
 </pre> 

 

 Unitialized constant maybe is my environment problem, but are those modulepaths normal?  
  

Back