Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45786

VSphereCloudRetentionStrategy idleMinutes not persistent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • vsphere-cloud-plugin
    • None
    • Jenkins 2.71
      vsphere-cloud-plugin 2.15

      Steps to reproduce

      1. Setup Environment
        1. Install the Jenkins vSphere Cloud Plugin
        2. Configure a vSphere Cloud Template
          1. Select the “vSphere Keep-Until-Idle” Retention Strategy and set the Idle Timeout to 10 minutes.
        3. Verify that you can successfully deploy a test node.
      2. Premature Node Termination (problem)
        1. Restart Jenkins. Do NOT go to the configuration page afterwards.
        2. Run a job using a dynamically deployed cloud slave.
        3. 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.
      3. Normal Node Termination (workaround)
        1. Go to the Jenkins configuration page and Save. No other changes are necessary.
        2. Run a job using a dynamically deployed cloud slave.
        3. 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.

            Unassigned Unassigned
            balleman Brady Alleman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: