Project

General

Profile

Actions

Bug #8725

closed

On unclear restart, the start occasionally fails with Action Actions::Candlepin::ListenOnCandlepinEvents is already active

Added by Ivan Necas about 10 years ago. Updated over 9 years ago.

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

Description

Unclear stop (a.k.a killing) the server might lead into the ListenOnCandlepinEvents action to end in inconsistent state and the following start of the service (server in development,
foreman-tasks in production) can end up with the following stacktrace

/home/vagrant/Projects/katello/app/lib/actions/candlepin/listen_on_candlepin_events.rb:58:in `plan': Action Actions::Candlepin::ListenOnCandlepinEvents is already active (RuntimeError)
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:411:in `block (3 levels) in execute_plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:29:in `plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass'
        from /home/vagrant/Projects/katello/app/lib/actions/middleware/keep_locale.rb:20:in `plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/world.rb:30:in `execute'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:410:in `block (2 levels) in execute_plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:223:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:223:in `switch_flow'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:321:in `concurrence'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:409:in `block in execute_plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:371:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:371:in `block in with_error_handling'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:371:in `catch'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:371:in `with_error_handling'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:408:in `execute_plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/action.rb:236:in `execute'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan/steps/plan_step.rb:46:in `block in execute'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan/steps/abstract.rb:152:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan/steps/abstract.rb:152:in `with_meta_calculation'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan/steps/plan_step.rb:45:in `execute'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:155:in `block (3 levels) in plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:223:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:223:in `switch_flow'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:213:in `with_planning_scope'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:154:in `block (2 levels) in plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:37:in `plan_phase'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:26:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:16:in `pass'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware.rb:37:in `plan_phase'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/stack.rb:22:in `call'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/middleware/world.rb:30:in `execute'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:153:in `block in plan'
        from /usr/local/share/gems/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
        from /usr/local/share/gems/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/transaction_adapters/active_record.rb:5:in `transaction'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/execution_plan.rb:152:in `plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/world.rb:113:in `block in plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/world.rb:111:in `tap'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/world.rb:111:in `plan'
        from /usr/local/share/gems/gems/dynflow-0.7.5/lib/dynflow/world.rb:92:in `trigger'
        from /usr/local/share/gems/gems/foreman-tasks-0.6.10/lib/foreman_tasks.rb:16:in `trigger'
        from /usr/local/share/gems/gems/foreman-tasks-0.6.10/lib/foreman_tasks.rb:22:in `trigger_task'
        from /usr/local/share/gems/gems/foreman-tasks-0.6.10/lib/foreman_tasks.rb:34:in `async_task'
        from /home/vagrant/Projects/katello/lib/katello/engine.rb:46:in `block in <class:Engine>'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/initializable.rb:30:in `run'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/initializable.rb:54:in `each'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/initializable.rb:54:in `run_initializers'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/application.rb:136:in `initialize!'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in `method_missing'
        from /home/vagrant/Projects/foreman/config/environment.rb:5:in `<top (required)>'
        from /usr/local/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /usr/local/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /usr/local/share/gems/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `block in require'
        from /usr/local/share/gems/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'
        from /usr/local/share/gems/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in `require'
        from /home/vagrant/Projects/foreman/config.ru:3:in `block in <main>'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
        from /home/vagrant/Projects/foreman/config.ru:in `new'
        from /home/vagrant/Projects/foreman/config.ru:in `<main>'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/commands/server.rb:46:in `app'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
        from /usr/local/share/gems/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/commands/server.rb:70:in `start'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/commands.rb:55:in `block in <top (required)>'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/commands.rb:50:in `tap'
        from /usr/local/share/gems/gems/railties-3.2.21/lib/rails/commands.rb:50:in `<top (req

Related issues 1 (0 open1 closed)

Has duplicate Katello - Bug #10865: starting rails in dev environment after improper shut down failsDuplicate06/18/2015Actions
Actions

Also available in: Atom PDF