hashicorp-vault-plugin: New [336.v182c0fbaaeb7] release breaks SCM checkout
Version report
Jenkins and plugins versions report:
Jenkins: 2.319.1
OS: Linux - 5.10.0-9-amd64
---
Office-365-Connector:4.15.2
ace-editor:1.1
ansible:1.1
ansicolor:1.0.1
ant:1.13
apache-httpcomponents-client-4-api:4.5.13-1.0
artifactory:3.13.2
atlassian-bitbucket-server-integration:3.1.0
authentication-tokens:1.4
basic-branch-build-strategies:1.3.2
blueocean:1.25.2
blueocean-autofavorite:1.2.4
blueocean-bitbucket-pipeline:1.25.2
blueocean-commons:1.25.2
blueocean-config:1.25.2
blueocean-core-js:1.25.2
blueocean-dashboard:1.25.2
blueocean-display-url:2.4.1
blueocean-events:1.25.2
blueocean-git-pipeline:1.25.2
blueocean-github-pipeline:1.25.2
blueocean-i18n:1.25.2
blueocean-jira:1.25.2
blueocean-jwt:1.25.2
blueocean-personalization:1.25.2
blueocean-pipeline-api-impl:1.25.2
blueocean-pipeline-editor:1.25.2
blueocean-pipeline-scm-api:1.25.2
blueocean-rest:1.25.2
blueocean-rest-impl:1.25.2
blueocean-web:1.25.2
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-3
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:734.v2f848c5e6ea2
cloudbees-disk-usage-simple:0.10
cloudbees-folder:6.16
cobertura:1.17
code-coverage-api:2.0.4
command-launcher:1.6
config-file-provider:3.8.2
configuration-as-code:1.55
credentials:2.6.2
credentials-binding:1.27
dashboard-view:2.18
data-tables-api:1.11.3-4
display-url-api:2.3.5
docker-commons:1.17
docker-java-api:3.1.5.2
docker-plugin:1.2.3
docker-workflow:1.26
durable-task:493.v195aefbb0ff2
echarts-api:5.2.2-1
email-ext:2.85
extended-read-permission:3.2
favorite:2.3.3
font-awesome-api:5.15.4-4
forensics-api:1.7.0
git:4.10.0
git-client:3.10.0
git-server:1.10
github:1.34.1
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.3
gradle:1.37.1
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
hashicorp-vault-pipeline:1.3
hashicorp-vault-plugin:336.v182c0fbaaeb7
htmlpublisher:1.28
ivy:2.1
jackson2-api:2.13.0-230.v59243c64b0a5
jacoco:3.3.0
javadoc:1.6
jaxb:2.3.0.1
jdk-tool:1.5
jenkins-design-language:1.25.2
jira:3.6
jira-steps:1.6.0
jjwt-api:0.11.2-9.c8b45b8bb173
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
lockable-resources:2.12
mailer:1.34
matrix-auth:2.6.9
matrix-project:1.19
maven-plugin:3.15.1
metrics:4.0.2.8
momentjs:1.1.1
node-iterator-api:1.5.1
okhttp-api:4.9.3-105.vb96869f8ac3a
pipeline-build-step:2.15
pipeline-github-lib:1.0
pipeline-graph-analysis:1.12
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.3
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.19
pipeline-utility-steps:2.11.0
plain-credentials:1.7
plugin-util-api:2.6.0
popper-api:1.16.1-2
popper2-api:2.10.2-1
prometheus:2.0.10
pubsub-light:1.16
resource-disposer:0.16
saml:2.0.9
scm-api:2.6.5
script-security:1.78
snakeyaml-api:1.29.1
sse-gateway:1.24
ssh-agent:1.23
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:308.v852b473a2b8c
terraform:1.0.10
timestamper:1.15
token-macro:267.vcdaea6462991
trilead-api:1.0.13
variant:1.4
vsphere-cloud:2.26
workflow-aggregator:2.6
workflow-api:2.47
workflow-basic-steps:2.24
workflow-cps:2640.v00e79c8113de
workflow-cps-global-lib:548.v9085a486966a
workflow-durable-task-step:1101.vf832bc1ac745
workflow-job:2.42
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
ws-cleanup:0.39
- What Operating System are you using (both controller, and any agents involved in the problem)?
Our controller is only being used as a job scheduler, all jobs run on dynamically spawned workers, based on Debian 11 images templates, via the vsphere-cloud plugin. Therefore, this issue is only affecting the workers.
Reproduction steps
- Install the latest Hashicorp Release
336.v182c0fbaaeb7
present here: link. - Run a standard pipeline that uses a SCM checkout step.
Results
Expected result:
SCM checkout works.
Actual result:
java.io.NotSerializableException: hudson.model.Hudson
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1185)
at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1553)
at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1510)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
at java.base/java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1379)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
at java.base/java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1553)
at java.base/java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1510)
at java.base/java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1433)
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1179)
at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
at hudson.remoting.UserRequest._serialize(UserRequest.java:263)
at hudson.remoting.UserRequest.serialize(UserRequest.java:272)
Caused: java.io.IOException: Unable to serialize UserRPCRequest:org.jenkinsci.plugins.gitclient.GitClient.addCredentials[java.lang.String,com.cloudbees.plugins.credentials.common.StandardCredentials](3)
at hudson.remoting.UserRequest.serialize(UserRequest.java:274)
at hudson.remoting.UserRequest.<init>(UserRequest.java:101)
at hudson.remoting.Channel.call(Channel.java:999)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:286)
Caused: hudson.remoting.RemotingSystemException
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:302)
at com.sun.proxy.$Proxy92.addCredentials(Unknown Source)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl.addCredentials(RemoteGitImpl.java:201)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:920)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:838)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1291)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Quite possibly related to the merge of October 1st: https://github.com/jenkinsci/hashicorp-vault-plugin/pull/178#discussion_r702989909
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 15
- Comments: 52 (25 by maintainers)
I can reproduce this using the last released version, but interestingly the version of the plugin I was using was built from my own branch while waiting for the previous release and that was not affected by this issue. That included #178 and #179 but not #195, possibly there’s a conflict between my changes and that one. I’ll see if I can find the root cause.
Looks like updating to the latest
ssh-credentials
(291.v8211e4f8efb_c) andcredentials
(1139.veb_9579fca_33b_) is enough to fix this issue, at least from the quick test I just ran.Workaround: manual downgrade to https://updates.jenkins.io/download/plugins/hashicorp-vault-plugin/3.8.0/hashicorp-vault-plugin.hpi
I’m using a local installation of Jenkins and as you can see, in my pipeline I used any and I didn’t configure any remote agents, so Jenkins is picking any local agent to run my pipeline. I’ll try to configure one agent to reproduce the problem you are facing. I think the https://github.com/jenkinsci/hashicorp-vault-plugin/pull/208 resolves the issue that’ll come after the one you get right now, when you try to clone using the ssh key, and I think you are not at this stage yet.
see https://github.com/jenkinsci/azure-keyvault-plugin/pull/96#issuecomment-998830667 I tried to fix it in #206 but it has issues. I need to find time to reduce the changeset to only include snapshotter.