-
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
[JENKINS-28993] Cant create SSH slave without credentials-id
Component/s | Original: credentials-plugin [ 16523 ] | |
Component/s | Original: ssh-credentials-plugin [ 17424 ] |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: JNJira [ 163858 ] | New: JNJira + In-Review [ 208897 ] |
SSH Slaves are configured with an SSH private key or username/password credentials ID. To create the slave, you must first create the credentials.