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

foreman-rake hooks:events[nic/bmc] ends with error bug #55

Open
1binary00 opened this issue May 28, 2018 · 0 comments
Open

foreman-rake hooks:events[nic/bmc] ends with error bug #55

1binary00 opened this issue May 28, 2018 · 0 comments

Comments

@1binary00
Copy link

1binary00 commented May 28, 2018

Hello,

The foreman-rake hooks:objects gives nic/bmc object.

However listing of foreman-rake hooks:events[nic/bmc]

fails with error:

** Invoke hooks:events (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute hooks:events
rake aborted!
LoadError: Unable to autoload constant Nic::Bmc, expected /usr/share/foreman/app/models/nic/bmc.rb to define it
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:495:in `load_missing_constant'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman_hooks-0.3.14/lib/foreman_hooks/as_dependencies_hook.rb:4:in `load_missing_constant'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:184:in `const_missing'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:263:in `const_get'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:263:in `block in constantize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:259:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:259:in `inject'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/inflector/methods.rb:259:in `constantize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.9/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/foreman_hooks-0.3.14/lib/tasks/hooks.rake:11:in `block (2 levels) in <top (required)>'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `call'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `block in execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:251:in `execute'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:195:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:188:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/task.rb:181:in `invoke'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:160:in `invoke_task'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/share/foreman/vendor/ruby/2.1.0/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => hooks:events

As domcleal says:
Arguably this is a bug in Foreman, it should define mixed-case Ec2 rather than all-caps EC2 to match the Rails autoloader expectations, but foreman_hooks could work around it.

Anybody knows if a workaround is possible or in progress ?

I was looking on foreman issue without finding is this problem was open. Is this normal?

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

No branches or pull requests

1 participant