In Katello, the job of destroying hosts is farmed off to foreman-tasks so that associated Katello entities like content_hosts can be dealt with at the same time. foreman-tasks runs outside of the main Foreman process, but takes care to load Foreman's application.rb and all of Foreman's plugins. The result is that hooks are run in foreman-tasks jobs, but they fail to find Foreman's views path:
In Katello, the job of destroying hosts is farmed off to foreman-tasks so that associated Katello entities like content_hosts can be dealt with at the same time. foreman-tasks runs outside of the main Foreman process, but takes care to load Foreman's
application.rb
and all of Foreman's plugins. The result is that hooks are run in foreman-tasks jobs, but they fail to find Foreman's views path: