Bug 1463269 - Smart proxy worker fails on encoding error
Smart proxy worker fails on encoding error
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Remote Execution (Show other bugs)
6.2.0
Unspecified Unspecified
medium Severity medium (vote)
: GA
: --
Assigned To: Adam Ruzicka
Ivan Necas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-20 09:15 EDT by Ivan Necas
Modified: 2018-02-21 11:51 EST (History)
6 users (show)

See Also:
Fixed In Version: tfm-rubygem-foreman_remote_execution_core-1.0.5
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 11:51:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
verification screenshot (19.38 KB, image/png)
2017-08-16 09:54 EDT, Ivan Necas
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 18356 None None None 2017-06-20 09:15 EDT

  None (edit)
Description Ivan Necas 2017-06-20 09:15:38 EDT
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:

<pre>
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
</pre>

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

error in smart proxy log
<pre>
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


</pre>
Comment 1 Ivan Necas 2017-06-20 09:15:44 EDT
Created from redmine issue http://projects.theforeman.org/issues/18356
Comment 2 Ivan Necas 2017-06-20 09:15:50 EDT
Upstream bug assigned to aruzicka@redhat.com
Comment 7 pm-sat@redhat.com 2017-07-26 10:11:57 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18356 has been resolved.
Comment 8 Ivan Necas 2017-08-16 09:54:03 EDT
Version Tested: Satellite-6.3 Snap 11

1. run the job with setting non-ascii locale `LANG="cs_CZ.UTF-8" yum search git`
2. job runs successfully and shows output correctly (see attachment)
Comment 9 Ivan Necas 2017-08-16 09:54 EDT
Created attachment 1314156 [details]
verification screenshot
Comment 10 pm-sat@redhat.com 2018-02-21 11:51:07 EST
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336

Note You need to log in before you can comment on or make changes to this bug.