Actions
Bug #11695
closedCan't delete host because of "A JSON text must at least contain two octets!"
Status:
Closed
Priority:
Normal
Assignee:
Category:
smart_proxy_chef
Target version:
Difficulty:
Triaged:
Description
When deleting a host which triggers node and client deletion on chef server, smart_proxy_chef 0.1.4 responds with empty response instead of json (on any delete chef API action). Therefore foreman tasks fails with A JSON text must at least contain two octets!
The whole task error:
Action: Actions::ForemanChef::Host::Destroy Input: {"host"=>{"id"=>1544, "name"=>"demo4.example.com"}, "chef_proxy_id"=>6} Output: {} Exception: JSON::ParserError: A JSON text must at least contain two octets! Backtrace: /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:155:in `initialize' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:155:in `new' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/json-1.8.3/lib/json/common.rb:155:in `parse' /home/ares/Projekty/Zdrojaky/foreman_chef/app/models/foreman_chef/smart_proxy_extensions.rb:17:in `delete_node' /home/ares/Projekty/Zdrojaky/foreman_chef/app/lib/actions/foreman_chef/host/destroy.rb:28:in `run' /home/ares/z/dynflow/lib/dynflow/action.rb:506:in `block (3 levels) in execute_run' /home/ares/z/dynflow/lib/dynflow/middleware/stack.rb:26:in `call' /home/ares/z/dynflow/lib/dynflow/middleware/stack.rb:26:in `pass' /home/ares/z/dynflow/lib/dynflow/middleware.rb:16:in `pass' /home/ares/z/dynflow/lib/dynflow/action/progress.rb:30:in `with_progress_calculation' /home/ares/z/dynflow/lib/dynflow/action/progress.rb:16:in `run' /home/ares/z/dynflow/lib/dynflow/middleware/stack.rb:22:in `call' /home/ares/z/dynflow/lib/dynflow/middleware/world.rb:30:in `execute' /home/ares/z/dynflow/lib/dynflow/action.rb:505:in `block (2 levels) in execute_run' /home/ares/z/dynflow/lib/dynflow/action.rb:504:in `catch' /home/ares/z/dynflow/lib/dynflow/action.rb:504:in `block in execute_run' /home/ares/z/dynflow/lib/dynflow/action.rb:419:in `call' /home/ares/z/dynflow/lib/dynflow/action.rb:419:in `block in with_error_handling' /home/ares/z/dynflow/lib/dynflow/action.rb:419:in `catch' /home/ares/z/dynflow/lib/dynflow/action.rb:419:in `with_error_handling' /home/ares/z/dynflow/lib/dynflow/action.rb:499:in `execute_run' /home/ares/z/dynflow/lib/dynflow/action.rb:260:in `execute' /home/ares/z/dynflow/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute' /home/ares/z/dynflow/lib/dynflow/execution_plan/steps/abstract.rb:155:in `call' /home/ares/z/dynflow/lib/dynflow/execution_plan/steps/abstract.rb:155:in `with_meta_calculation' /home/ares/z/dynflow/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute' /home/ares/z/dynflow/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action' /home/ares/z/dynflow/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute' /home/ares/z/dynflow/lib/dynflow/executors/parallel/worker.rb:15:in `block in on_message' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matchers/abstract.rb:74:in `block in assigns' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matchers/abstract.rb:73:in `tap' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matchers/abstract.rb:73:in `assigns' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matching.rb:56:in `match_value' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matching.rb:36:in `block in match?' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matching.rb:35:in `each' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matching.rb:35:in `match?' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/algebrick-0.7.3/lib/algebrick/matching.rb:23:in `match' /home/ares/z/dynflow/lib/dynflow/executors/parallel/worker.rb:12:in `on_message' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/context.rb:47:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/executes_context.rb:7:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/z/dynflow/lib/dynflow/actor.rb:26:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/awaits.rb:15:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/buffer.rb:38:in `process_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/buffer.rb:31:in `process_envelopes?' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/buffer.rb:20:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/termination.rb:55:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/removes_child.rb:10:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/abstract.rb:26:in `pass' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/core.rb:161:in `process_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/core.rb:95:in `block in on_envelope' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/core.rb:118:in `block (2 levels) in schedule_execution' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/synchronization/mutex_object.rb:18:in `block in synchronize' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/synchronization/mutex_object.rb:18:in `synchronize' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/synchronization/mutex_object.rb:18:in `synchronize' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-edge-0.1.1/lib/concurrent/actor/core.rb:115:in `block in schedule_execution' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/serialized_execution.rb:19:in `call' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/serialized_execution.rb:19:in `call' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/serialized_execution.rb:97:in `work' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/serialized_execution.rb:78:in `block in call_job' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:331:in `call' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:331:in `run_task' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (3 levels) in create_worker' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:303:in `loop' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:303:in `block (2 levels) in create_worker' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:302:in `catch' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/concurrent-ruby-0.9.1/lib/concurrent/executor/ruby_thread_pool_executor.rb:302:in `block in create_worker' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `call' /home/ares/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `block in create_with_logging_context'
Actions