Project

General

Profile

Actions

Bug #1556

closed

Puppet rdoc generation is broken in Foreman

Added by Eduardas Jarusevicius over 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Puppet integration
Target version:
Fixed in Releases:
Found in Releases:

Description

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:

** 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

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:

** 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

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


Related issues 5 (0 open5 closed)

Related to Foreman - Bug #11615: Puppet class index "Environment and Documentaion" links brokenClosedTomer Brisker08/30/2015Actions
Related to Foreman - Bug #1189: Example rdoc_prepare_script fails on RHEL 5Resolved09/28/2011Actions
Related to Foreman - Bug #14106: Remove puppetclass no_route pageClosedDaniel Lobato Garcia03/08/2016Actions
Is duplicate of Foreman - Bug #1405: puppet classed rdoc viewer links are brokenDuplicateOhad Levy12/19/2011Actions
Has duplicate Foreman - Bug #6666: foreman-rake puppet:rdoc:generate doesn't work with puppet 3.6Duplicate07/17/2014Actions
Actions

Also available in: Atom PDF