[JENKINS-72474] for ssh agents on z/OS neutralize char set conversions done by z/OS OpenSSH implementation #710
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing JENKINS-72474
On z/OS platform ssh stdin and stdout receive character set conversion between the EBCDIC code used at z/OS side and ISO-8859-1 character set (cf. OpenSSH and globalization table 1, scenario 5). This hampers communication between Jenkins ssh agents running on z/OS that communicate via stdin/stdout with Jenkins controller.
There are two known workarounds that require configuration:
-Dfile.encoding=ISO-8859-1
(this may have unintended side effects on other Jenkins components/plugins)iconv -f 1047 -t ISO8859-1 | (
and Suffix Start Agent Command) | iconv -t 1047 -f ISO8859-1
(assuming that the z/OS side character set is IBM1047).However, to address this issue and run ssh agents on z/OS out of the box without additional configuration a stream wrapper (hudson.remoting.ZosSshInOutStreamWrapper) is introduced that neutralizes the conversion done by z/OS OpenSSH implementation.
By default the wrapper is enabled on z/OS platform only and uses system property
ibm.system.encoding
to determine the EBCDIC character set to be used.The EBCDIC character set can be specified explicitly by setting system property
hudson.remoting.ZosSshInOutStreamWrapper
to the character set name.To disable the wrapper set system property
hudson.remoting.ZosSshInOutStreamWrapper
to valuedisabled
.Testing done
A ssh agent on z/OS has been ramped up with various system properties:
-Dhudson.remoting.ZosSshInOutStreamWrapper=disabled -Dfile.encoding=ISO-8859-1
-Dhudson.remoting.ZosSshInOutStreamWrapper=IBM1047
Submitter checklist