Closed jayhendren closed 4 years ago
I'm getting the same error under ssh slaves plugin 1.31.0. I downgraded to 1.28.1 reran chef job and everything is working.
I have the same problem with version 1.31.0.
Browsing the ssh-slaves plugin
source on Github (class SSHLauncher
), I can confirm that since version 1.30.0 of the plugin the following Constructor (which was deprecated) has been removed. This Constructor will be used from the Groovy script of jenkins_ssh_slave
resource.
@Deprecated
public SSHLauncher(String host, int port, String credentialsId, String jvmOptions, String javaPath, String prefixStartSlaveCmd, String suffixStartSlaveCmd, Integer launchTimeoutSeconds, Integer maxNumRetries, Integer retryWaitTime) { ... }
However the new Constructor since version 1.30.0 reads as follows:
public SSHLauncher(@NonNull String host, int port, String credentialsId, String jvmOptions, String javaPath, String prefixStartSlaveCmd, String suffixStartSlaveCmd, Integer launchTimeoutSeconds, Integer maxNumRetries, Integer retryWaitTime, SshHostKeyVerificationStrategy sshHostKeyVerificationStrategy) { ... }
Meaning, that jenkins_ssh_slave
resource should add the SshHostKeyVerificationStrategy
in its groovy script, to solve the problem.
Therefore the latest working plugin version for me is 1.29.4.
Also, you can look in #589 that issue has examples for working around this if you fork this cookbook.
Cookbook version
7.0.0
Chef-client version
14.13.11
Platform Details
RHEL 7
Scenario:
Creating a slave using the jenkins_ssh_slave resource
Steps to Reproduce:
Install ssh-slaves plugin 1.30.2 and use jenkins_ssh_slave to create a slave.
I get no errors with ssh-slaves plugin 1.28.1. I haven't tested any intermediate versions of the plugin.
Expected Result:
Slave created without errors.
Actual Result: