-
Bug
-
Resolution: Not A Defect
-
Critical
-
Jenkins 1.596.2
SSH credentials 1.11
SSH Slaves 1.9
Credentials 1.22
I am using the REST API to create a SSH slave using a username/privatekey (and not a credentials-id, doesn't match my use case).
The request looks like:
{{
https://integration.wikimedia.org/ci/computer/doCreateItem?
json=
{
"labelString": "ci-jessie-wikimedia",
"launcher":
,
"mode": "EXCLUSIVE",
"name": "ci-jessie-wikimedia-33",
"nodeDescription": "Dynamic single use ci-jessie-wikimedia node",
"nodeProperties":
,
"numExecutors": 1,
"remoteFS": "/home/jenkins",
"retentionStrategy":
,
"type": "hudson.slaves.DumbSlave$DescriptorImpl"
}
&type=hudson.slaves.DumbSlave$
DescriptorImpl&name=ci-jessie-wikimedia-33
}}
There is a NPE somewhere between the credentials plugin and the sshslaves plugin:
{{
Caused by: java.lang.NullPointerException
at com.cloudbees.plugins.credentials.matchers.IdMatcher.<init>(IdMatcher.java:49)
at com.cloudbees.plugins.credentials.CredentialsMatchers.withId(CredentialsMatchers.java:112)
at hudson.plugins.sshslaves.SSHLauncher.lookupSystemCredentials(SSHLauncher.java:291)
at hudson.plugins.sshslaves.SSHLauncher.<init>(SSHLauncher.java:268)
}}
The code state that a NPE is raised. Seems there is no way to create a SSH slave without a credentials-id which is rather annoying
Downstream bug: https://phabricator.wikimedia.org/T103120