Project

General

Profile

Actions

Bug #15114

closed

Katello's late initialization causes issues when resuming dynflow tasks

Added by Ivan Necas over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

It was introduced in this commit https://github.com/Katello/katello/commit/d637aa2b48ea02b3b73efbd8168eab9629be8afe#diff-cf74e596d7887011413ee9d06b16b753R198

It seems it was introduced after changes in the assets pipeline. The problem is we need to resume tasks, that are pending execution once the foreman-tasks executor starts and after_initialize is the last instance we can hook in in the load process to start the execution. Since the katello's plugin initializes itself in after_initialize as well, we occasionally hit issues such as pulp logger being not initialized yet by that time.

Action: Actions::Pulp::Repository::Sync

RuntimeError: Trying to use logger katello/pulp_rest which has not been configured.

---
- "/usr/share/foreman/lib/foreman/logging.rb:54:in `logger'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/app/services/katello/pulp/server.rb:14:in
  `config'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/config/initializers/runcible.rb:3:in
  `pulp_server'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/app/lib/actions/pulp/abstract.rb:13:in
  `pulp_resources'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/app/lib/actions/pulp/repository/sync.rb:34:in
  `invoke_external_task'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/action/polling.rb:83:in
  `initiate_external_action'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/action/polling.rb:18:in
  `run'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/action/cancellable.rb:9:in
  `run'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/app/lib/actions/pulp/abstract_async_task.rb:45:in
  `run'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/action.rb:506:in
  `block (3 levels) in execute_run'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/middleware/stack.rb:26:in
  `call'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/middleware/stack.rb:26:in
  `pass'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/middleware.rb:17:in
  `pass'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/middleware.rb:30:in
  `run'" 
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.10/lib/dynflow/middleware/stack.rb:22:in
  `call'" 

Related issues 1 (0 open1 closed)

Blocks foreman-tasks - Bug #15055: Task fails with "undefined method `cp_config' for"ClosedIvan Necas05/16/2016Actions
Actions

Also available in: Atom PDF