Foreman_host_rundeck plugin broken in foreman 1.17

Problem:
After upgrading to version 1.17 Foreman won’t start due to issues with foreman_host_rundeck plugin.
Expected outcome:
Work normally with the rundeck plugin as 1.16 did.
Foreman and Proxy versions:
1.17
Foreman and Proxy plugin versions:
1.17
Other relevant data:

rake aborted!
NameError: undefined method `rundeck' for class `HostsController'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_rundeck-0.0.2/app/controllers/concerns/foreman_host_rundeck/hosts_controller_extensions.rb:6:in `alias_method'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_rundeck-0.0.2/app/controllers/concerns/foreman_host_rundeck/hosts_controller_extensions.rb:6:in `block in <module:HostsControllerExtensions>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/concern.rb:120:in `class_eval'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/concern.rb:120:in `append_features'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_rundeck-0.0.2/lib/foreman_host_rundeck/engine.rb:21:in `include'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_host_rundeck-0.0.2/lib/foreman_host_rundeck/engine.rb:21:in `block in <class:Engine>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413:in `instance_exec'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413:in `block in make_lambda'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:197:in `block (2 levels) in halting'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:601:in `block (2 levels) in default_terminator'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:600:in `catch'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:600:in `block in default_terminator'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:198:in `block in halting'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:507:in `block in invoke_before'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:507:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:507:in `invoke_before'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:130:in `run_callbacks'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/reloader.rb:87:in `prepare!'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/application/finisher.rb:61:in `block in <module:Finisher>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/application.rb:329:in `require_environment!'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => environment

It has been unmaintained and has been removed for 1.18. We should have done the same in 1.17.

Note that if someone steps up we can unarchive it and include it again.

It’s a shame. We highly rely on both rundeck and foreman. Removing the rundeck plugin will make us stuck at 1.16 indefinitely. I understand it’s development stopped long time ago, but there’s not much else to develop as it’s very simple and functional as is.

Like I said: if anyone who uses Rundeck steps up it’d be easy to revive the plugin. We’ll gladly help. It does look like a fairly trivial plugin. I do wonder if it should perhaps talk to the API and be implemented as a hammer plugin.

I was able to fix the plugin and it now works on version 1.17. I’ll have to test it on newer versions. Forked the archived plugin and committed the changes here https://github.com/alejandrocfg/foreman_host_rundeck/commit/1773deca8f56ba6e0f18f7ea1a9c4ac1c5981af0

I’d be nice if we could revive the plugin again.

I’d be happy to revive the plugin and include the packages again. Would you be willing to adopt the plugin? This would involve making changes to stay compatible and doing releases. We can help with a lot of the work around it (like packaging), but need someone who actually uses rundeck.

If so, I’m sure @Gwmngilfen can help kick this process off.

OK I’ll do it :slight_smile: Thanks for the help.

Looks like this was forgotten. I’ve unarchived https://github.com/theforeman/foreman_host_rundeck and would look forward to a PR that brings the plugin up to date.