0

I have configured VCenter Cloud plugin in jenkins which uses the SSH launch method. I have installed OpenSSH and I am able to SSH and SCP to the machine from which I have created template. When I use this in the pipeline I see the VM gets deployed in vcenter not sure if the customization gets applied or not. I see the log as slave online. Then I see one more vm gets created and the previous one gets powered off and deleted. This goes on.

EDIT: I configured JNLP instead of SSH and the behavior is the same.

EDIT: Without customization the provisioning of windows vm works fine. When customization applied and the vm restarts it receives a delete notification from the plugin and it gets deleted and new vm is created again. This goes on in loop. Any help in this area is greatly appriciated.

Can I get help on what is the triggering for deletion of vm? Here is the relevant jenkins log.

Jul 22, 2019 5:44:52 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog STARTING VSPHERE CLOUD Jul 22, 2019 5:45:40 AM INFO org.jenkinsci.plugins.vSphereCloud calculateMaxAdditionalSlavesPermitted There are 1 VMs in this cloud. The instance cap for the cloud is 15, so we have room for more Jul 22, 2019 5:45:40 AM INFO org.jenkinsci.plugins.vSphereCloud provision provision(mssql,1): 0 existing slaves (=0 executors), templates available are [Template[prefix=mssql-, provisioned=[], planned=[], unwanted={}, max=2147483647, fullness=0.000%]] Jul 22, 2019 5:45:40 AM INFO org.jenkinsci.plugins.vSphereCloud provision provision(mssql,1): Provisioning 1 new =[mssql-c4mz6wao3rd17d1mkqg3ebcwk] Jul 22, 2019 5:45:40 AM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply Started provisioning mssql-c4mz6wao3rd17d1mkqg3ebcwk from vSphereCloud with 1 executors. Remaining excess workload: 0 Jul 22, 2019 5:49:50 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesClientProvider gracefulClose Not closing io.fabric8.kubernetes.client.DefaultKubernetesClient@4963a818: there are still running (1) or queued (0) calls Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Starting Virtual Machine... Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud$VSpherePlannedNode$1 call Provisioned new slave mssql-c4mz6wao3rd17d1mkqg3ebcwk Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] VM already powered on Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Waiting for VMTools Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] VM Tools are running Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Finished wait for VMTools Jul 22, 2019 5:51:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Waiting for 60 seconds before asking hudson.plugins.sshslaves.SSHLauncher@b437c0e to launch slave. Jul 22, 2019 5:51:50 AM INFO hudson.slaves.NodeProvisioner$2 run mssql-c4mz6wao3rd17d1mkqg3ebcwk provisioning successfully completed. We have now 83 computer(s) Jul 22, 2019 5:52:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Asking SSHLauncher to launch slave. Jul 22, 2019 5:52:47 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Slave online Jul 22, 2019 5:52:50 AM INFO org.jenkinsci.plugins.vSphereCloud calculateMaxAdditionalSlavesPermitted There are 2 VMs in this cloud. The instance cap for the cloud is 15, so we have room for more Jul 22, 2019 5:52:50 AM INFO org.jenkinsci.plugins.vSphereCloud provision provision(mssql,1): 0 existing slaves (=0 executors), templates available are [Template[prefix=mssql-, provisioned=[mssql-c4mz6wao3rd17d1mkqg3ebcwk], planned=[], unwanted={}, max=2147483647, fullness=0.000%]] Jul 22, 2019 5:52:50 AM INFO org.jenkinsci.plugins.vSphereCloud provision provision(mssql,1): Provisioning 1 new =[mssql-3r9lhyucmhgwnvd5l2jiw88w4] Jul 22, 2019 5:52:50 AM INFO hudson.slaves.NodeProvisioner$StandardStrategyImpl apply Started provisioning mssql-3r9lhyucmhgwnvd5l2jiw88w4 from vSphereCloud with 1 executors. Remaining excess workload: 0 Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Running disconnect procedure... Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Disconnected computer mssql-c4mz6wao3rd17d1mkqg3ebcwk Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Disconnect done. Performing idle action NOTHING... Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud provisionedSlaveHasTerminated provisionedSlaveHasTerminated(mssql-c4mz6wao3rd17d1mkqg3ebcwk): scheduling deletion of mssql-c4mz6wao3rd17d1mkqg3ebcwk Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Idle action NOTHING complete. Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Running disconnect procedure... Jul 22, 2019 5:53:57 AM INFO hudson.slaves.SlaveComputer tryReconnect Attempting to reconnect hcm-regression-vertica.hpeswlab.net Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Disconnect done. Performing idle action NOTHING... Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Idle action NOTHING complete. Jul 22, 2019 5:53:57 AM INFO org.jenkinsci.plugins.vSphereCloud InternalLog [mssql-c4mz6wao3rd17d1mkqg3ebcwk] Slave is null.

1 Answer 1

0

No matter what we'd get disconnected. Finally we found the answer. In plugin configuration under retention strategy the ideal timeout was 2 and we increased it to 5 and it worked. This timeout starts as soon as the node is deployed and windows takes little longer to register as a a jenkins slave in both the methods SSH/JNLP so it was getting disconnected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .