Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-72474] for ssh agents on z/OS neutralize char set conversions done by z/OS OpenSSH implementation #710

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lne3
Copy link

@lne3 lne3 commented Jan 3, 2024

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:

  • run ssh agent with JVM option -Dfile.encoding=ISO-8859-1 (this may have unintended side effects on other Jenkins components/plugins)
  • run ssh agent with Prefix Start Agent Command 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 value disabled.

Testing done

A ssh agent on z/OS has been ramped up with various system properties:

  1. without any system properties set in JVM Options of the ssh agent configuration
  2. JVM Options -Dhudson.remoting.ZosSshInOutStreamWrapper=disabled -Dfile.encoding=ISO-8859-1
  3. JVM Options -Dhudson.remoting.ZosSshInOutStreamWrapper=IBM1047

Submitter checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant