Actions
Bug #12456
closedHandilng non-utf characters ssh exceptions
Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Description
The exception comming from ssh or scp can include some non-utf characters,
that causes json serialization errors, such in this case:
1. configure the remote_working_dir on smart_proxy_remote_execution_ssh to point to a directory where the user doens't
have write permissions
2. run a command
3. an exception is raised no the proxy side
[#<Proxy::RemoteExecution::Ssh::CommandUpdate::DebugData:0x000000047b6390 @data="Error initializing command #<Proxy::RemoteExecution::Ssh::Dispatcher::Command:0x00000004822590>\nRuntimeError Unable to create directory on remote system /var/tmp/no-perms/foreman-ssh-cmd-70dd8044-816a-47a9-b69c-2a68b3c75c1f: exit code: 1\n mkdir: cannot create directory \xE2\x80\x98/var/tmp/no-perms/foreman-ssh-cmd-70dd8044-816a-47a9-b69c-2a68b3c75c1f\xE2\x80\x99: Permission denied\n", @timestamp=2015-11-12 14:42:16 +0100>, #<Proxy::RemoteExecution::Ssh::CommandUpdate::StatusData:0x000000047b62f0 @data="EXCEPTION", @timestamp=2015-11-12 14:42:16 +0100>] [2015-11-12 14:42:16.473 #10986] DEBUG -- dynflow: command [#<Proxy::RemoteExecution::Ssh::Dispatcher::Command:0x00000004822590>] finished with status EXCEPTION [2015-11-12 14:42:16.474 #10986] DEBUG -- dynflow: closing session to inecas@172.17.0.88 [2015-11-12 14:42:16.475 #10986] DEBUG -- dynflow: closing session for command [#<Proxy::RemoteExecution::Ssh::Dispatcher::Command:0x00000004822590>], 0 session(s) left
4. this error doesn't propagate to the output due to another exception:
E, [2015-11-12T14:42:16.481503 #10986] ERROR -- : "\xE2" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) /home/inecas/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/multi_json-1.11.2/lib/multi_json/adapters/json_common.rb:19:in `encode' /home/inecas/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/multi_json-1.11.2/lib/multi_json/adapters/json_common.rb:19:in `to_json'
Updated by Ivan Necas about 9 years ago
- Translation missing: en.field_release set to 106
Updated by The Foreman Bot about 9 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ivan Necas
- Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/15 added
Updated by Ivan Necas about 9 years ago
- Related to Bug #12437: unable to view host job detail added
Updated by Ivan Necas about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_proxy_plugin|42d6815c2e7c34b9077aa8c3bee04aea2a4eb1af.
Updated by Ivan Necas over 8 years ago
- Related to Bug #10581: UTF8 encoding error on realm update with freeipa added
Updated by Marek Hulán almost 8 years ago
- Related to Bug #18356: Smart proxy worker fails on encoding error added
Actions