kontena / pharos-cluster

Pharos - The Kubernetes Distribution
https://k8spharos.dev/
Apache License 2.0
311 stars 43 forks source link

All SSH commands should run with a normalized locale #506

Closed SpComb closed 6 years ago

SpComb commented 6 years ago

The behavior of system commands run by pharos-cluster should not depend on the locale of the user running pharos-cluster. The scripts/phases may assume english-language output and break with a non-english locale (see #501).

I assume Net::SSH is sending LC_* env vars from the script env by default... those should be overridden to use LC_ALL=C.UTF-8.

SpComb commented 6 years ago

Confirm that Net::SSH defaults is forwarding LC_* envs:

I, [2018-08-08T08:05:58.010191 #1]  INFO -- net.ssh.connection.session[964f60]: channel_open_confirmation: 9 0 0 32768
I, [2018-08-08T08:05:58.010631 #1]  INFO -- net.ssh.connection.channel[b6bafc]: sending channel request "env"
D, [2018-08-08T08:05:58.010999 #1] DEBUG -- socket[b9a938]: queueing packet nr 46 type 98 len 44
I, [2018-08-08T08:05:58.011126 #1]  INFO -- net.ssh.connection.channel[b6bafc]: sending channel request "exec"
D, [2018-08-08T08:05:58.011428 #1] DEBUG -- socket[b9a938]: queueing packet nr 47 type 98 len 44