-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 2.71
vsphere-cloud-plugin 2.15
Steps to reproduce
- Setup Environment
- Install the Jenkins vSphere Cloud Plugin
- Configure a vSphere Cloud Template
- Select the “vSphere Keep-Until-Idle” Retention Strategy and set the Idle Timeout to 10 minutes.
- Verify that you can successfully deploy a test node.
- Premature Node Termination (problem)
- Restart Jenkins. Do NOT go to the configuration page afterwards.
- Run a job using a dynamically deployed cloud slave.
- When the job completes, observe that the dynamic slave is terminated on the first retention strategy check (within a few minutes), despite not having been idle for the configured idle timeout.
- Normal Node Termination (workaround)
- Go to the Jenkins configuration page and Save. No other changes are necessary.
- Run a job using a dynamically deployed cloud slave.
- When the job completes, observe that the dynamic slave is terminated in accordance with the configured idle timeout.
Possible Cause
Both the VSphereCloudRetentionStrategy and its superclass CloudRetentionStrategy define a private int ‘idleMinutes’ field. This seems to cause CloudRetentionStrategy’s field to not be properly stored and/or restored when Jenkins is restarted.
Possible Resolution
Renaming the field in VSphereCloudRetentionStrategy seems to resolve the problem. The configuration will need to be saved once after the updated plugin is installed.