Project

General

Profile

Bug #18356

Smart proxy worker fails on encoding error

Added by Marek Hulán over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart Proxy Dynflow
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When I run the package installation job to install git package on centos 7, I'm getting following in smart proxy log. It might be related to #12456, the error suggests that some characters can't be converted? When I ran the same command manually, I got the output in custom locale with wide characters which is probably the cause.

output of the command:

Zavedené moduly: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.cvut.cz
 * epel: mirror.karneval.cz
 * extras: ftp.cvut.cz
 * updates: ftp.cvut.cz
Balíček git-1.8.3.1-6.el7_2.1.x86_64 je již nainstalován a v poslední verzi
Není co dělat

setting LANG=C in pre_script works but this workaround is only applicable for package jobs.

error in smart proxy log

E, [2017-02-01T21:39:51.984363 #9198] ERROR -- /parallel-executor-core/pool/worker-4: "\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb:19:in `encode'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb:19:in `to_json'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/multi_json-1.12.1/lib/multi_json/adapters/json_common.rb:19:in `dump'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb:25:in `dump'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/multi_json-1.12.1/lib/multi_json.rb:139:in `dump'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/persistence_adapters/sequel.rb:284:in `dump_data'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/persistence_adapters/sequel.rb:227:in `prepare_record'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/persistence_adapters/sequel.rb:239:in `save'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/persistence_adapters/sequel.rb:129:in `save_action'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/persistence.rb:32:in `save_action'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:23:in `open_action'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/director.rb:55:in `execute'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/executors/parallel/worker.rb:11:in `on_message'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/context.rb:46:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/executes_context.rb:7:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/dynflow-0.8.17/lib/dynflow/actor.rb:26:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/awaits.rb:15:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/buffer.rb:38:in `process_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/buffer.rb:31:in `process_envelopes?'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/buffer.rb:20:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/termination.rb:55:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/removes_child.rb:10:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/core.rb:161:in `process_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/core.rb:95:in `block in on_envelope'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/core.rb:118:in `block (2 levels) in schedule_execution'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `block in synchronize'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/synchronization/mri_lockable_object.rb:38:in `synchronize'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-edge-0.2.2/lib/concurrent/actor/core.rb:115:in `block in schedule_execution'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/serialized_execution.rb:18:in `call'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/serialized_execution.rb:18:in `call'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/serialized_execution.rb:96:in `work'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/serialized_execution.rb:77:in `block in call_job'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `call'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
/home/ares/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/concurrent-ruby-1.0.3/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
[2017-02-01 21:39:51.986 #9198] DEBUG --          Step c4a9f499-57af-4d82-a9a0-ab597b91ea44: 5   pending >>   running in phase      Run SmartProxyDynflowCore::Callback::Action
[2017-02-01 21:39:53.532 #9198] DEBUG --          Step c4a9f499-57af-4d82-a9a0-ab597b91ea44: 5   running >>   success in phase      Run SmartProxyDynflowCore::Callback::Action
[2017-02-01 21:39:53.583 #9198] DEBUG --          Step c4a9f499-57af-4d82-a9a0-ab597b91ea44: 3   pending >>   running in phase Finalize ForemanRemoteExecutionCore::Actions::RunScript
[2017-02-01 21:39:53.598 #9198] ERROR -- Script execution failed
[2017-02-01 21:39:53.598 #9198] DEBUG --          Step c4a9f499-57af-4d82-a9a0-ab597b91ea44: 3   running >>     error in phase Finalize ForemanRemoteExecutionCore::Actions::RunScript
[2017-02-01 21:39:53.636 #9198] DEBUG -- ExecutionPlan c4a9f499-57af-4d82-a9a0-ab597b91ea44      running >>    paused


Related issues

Related to Foreman Remote Execution - Bug #12456: Handilng non-utf characters ssh exceptionsClosed2015-11-12
Related to Foreman Remote Execution - Bug #19248: ssh Remote Execution fails when output contains special charactersResolved2017-04-11

Associated revisions

Revision ddba9772 (diff)
Added by adamruzicka about 2 years ago

Fixes #18356 - Assume incoming data is UTF8

History

#1 Updated by Marek Hulán over 2 years ago

  • Related to Bug #12456: Handilng non-utf characters ssh exceptions added

#2 Updated by Marek Hulán over 2 years ago

  • Related to Bug #19248: ssh Remote Execution fails when output contains special characters added

#3 Updated by The Foreman Bot about 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/252 added

#4 Updated by Adam Ruzicka about 2 years ago

  • Assignee deleted (Adam Ruzicka)
  • Target version set to 1.13.3
  • Pull request https://github.com/theforeman/foreman-tasks/pull/254 added

#5 Updated by The Foreman Bot about 2 years ago

  • Assignee set to Adam Ruzicka

#6 Updated by Ivan Necas about 2 years ago

  • Pull request deleted (https://github.com/theforeman/foreman-tasks/pull/254)

#7 Updated by Anonymous about 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by Ivan Necas about 2 years ago

  • Bugzilla link set to 1463269

#9 Updated by Ivan Necas about 2 years ago

  • Target version changed from 1.13.3 to 1.14.1

#10 Updated by Ivan Necas about 2 years ago

  • Legacy Backlogs Release (now unused) set to 280

Also available in: Atom PDF