-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Latest Trilead API plugin version 1.71.v9e7860a_67a_df
fails when using JDK8 for agent process
#3090
Comments
See jenkins-infra/update-center2#629 etc. |
Currently checking ci.jenkins.io's Java configuration (extends to trusted.ci.jenkins.io to some extents):
|
Opened 2 plugins issues for elements that were missing:
|
Updated existing container images for JDK8 and JDK17 to ensure they have JDK11 (VM templates have the 3 JDKs so no worry): |
Side node: the manual experiments weren't fully cleaned up which led to aci-maven-8 failures as per #3094. Reason is that I thought the ACI container were using fixed images (with shasum) for Windows container while they are not: https://github.com/jenkins-infra/jenkins-infra/blob/production/hieradata/common.yaml#L198 (compared to Linux images). So after jenkins-infra/docker-inbound-agents#35 was merged (and deployed) to DockerHub, the manual setting Corrective measures applied:
|
Diff on trusted.ci.jenkins.io: --- /var/lib/jenkins/casc.d/clouds.yaml 2022-08-08 08:10:30.656864026 +0000
+++ /tmp/puppet-file20220811-30324-1fj4ua0 2022-08-11 09:03:38.213529268 +0000
@@ -30,7 +30,8 @@
installDocker: false
installGit: false
installMaven: false
- javaPath: "java"
+ javaPath: "/opt/jdk-11/bin/java"
+ jvmOptions: "-XX:+PrintCommandLineFlags"
labels: "ubuntu amd64 azure vm java linux docker maven-11 jdk11"
location: "East US"
noOfParallelJobs: 1
@@ -57,7 +58,7 @@
existingResourceGroupName: "jenkinsinfra-trustedvmagents"
vmTemplates:
- agentLaunchMethod: "SSH"
- agentWorkspace: "C:\\Jenkins"
+ agentWorkspace: "C:/Jenkins"
credentialsId: "azure-jenkins-user"
diskType: "managed"
doNotUseMachineIfInitFails: true
@@ -77,7 +78,8 @@
installDocker: false
installGit: false
installMaven: false
- javaPath: "java"
+ javaPath: "C:/tools/jdk-11/bin/java"
+ jvmOptions: "-XX:+PrintCommandLineFlags"
labels: "windows amd64 azure vm docker-windows"
location: "East US"
noOfParallelJobs: 1 🚀 |
Next step: ci.jenkins.io. Currently fixing minro hiccups underlined by the diff. |
|
Thanks to jenkins-infra/jenkins-infra#2321, the agent trusted-agent-1 is now managed (at least for its JDKs): root@ip-172-31-5-190:~# /opt/jdk-8/bin/java -version
openjdk version "1.8.0_345"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_345-b01)
OpenJDK 64-Bit Server VM (Temurin)(build 25.345-b01, mixed mode)
root@ip-172-31-5-190:~# /opt/jdk-11/bin/java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment Temurin-11.0.16+8 (build 11.0.16+8)
OpenJDK 64-Bit Server VM Temurin-11.0.16+8 (build 11.0.16+8, mixed mode)
root@ip-172-31-5-190:~# /opt/jdk-17/bin/java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment Temurin-17.0.4+8 (build 17.0.4+8)
OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode, sharing) |
This change caused #3096. Fixed now by 2 PRs on puppet. |
Ref. jenkins-infra/kubernetes-management#2701 for Kubernetes |
Proposal from @lemeurherve for the AWS EC2 Windows machines: adding a custom powershell script in the VM image template that would overides the default startup command (and accept the JDK bin path as argument) until the feature is implement in the ec2 plugin |
would it be less work to just add the feature you want? example PR for Azure: jenkinsci/azure-vm-agents-plugin#186 |
I agree with this statement. But worth mentioning the idea if short maintenance has to be done. Anyway, closing the issue as the trilead issue was fixed. |
Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565
* fix: use ec2-plugin 'javaPath' option instead of command prefix Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565 * fix: use slash instead of antislash for Windows paths * add missing .exe extension for the Windows javaPath
For the record, the feature has been added to ec2-plugin: https://github.com/jenkinsci/ec2-plugin/releases/tag/ec2-2.0.0 |
…ins-infra#2721) * fix: use ec2-plugin 'javaPath' option instead of command prefix Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565 * fix: use slash instead of antislash for Windows paths * add missing .exe extension for the Windows javaPath
…ins-infra#2721) * fix: use ec2-plugin 'javaPath' option instead of command prefix Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565 * fix: use slash instead of antislash for Windows paths * add missing .exe extension for the Windows javaPath
Service(s)
ci.jenkins.io, trusted.ci.jenkins.io
Summary
(This issue is written almost 1 week after the real problem)
The version of the plugin Trilead API was released the 2nd of August 2022: https://github.com/jenkinsci/trilead-api-plugin/releases/tag/1.71.v9e7860a_67a_df.
Once it was installed on the LTS Jenkins Controllers ci.jenkins.io and trusted.ci.jenkins.io, we immediatly saw the following error messages when connecting to SSH agents or cloning git repositories over SSH:
Caused by: java.lang.UnsupportedClassVersionError: com/trilead/ssh2/ServerHostKeyVerifier has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
We realized that this error happens when the agents processes are running with a JDK (while our controller uses JDK11).
Even if this kind of setup (different JDK) should work, it is not recommended so the infra should be updated to always use JDK11 (with JDK11 controllers).
trusted-agent-1
node which was failing to start the agent process in/opt/jdk-11
The infra team now has to ensure that all agent templates (cloud or permanent) of all controllers have an explicit JDK specified for agent process and cleans up any leftovers or unmanaged changes to get the following benefits:
TODO:
trusted-agent-1
JDK installation as code with PuppetReproduction steps
No response
The text was updated successfully, but these errors were encountered: