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

"Clone Name Prefix" is not unique enough

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • vsphere-cloud-plugin
    • None
    • Jenkins 2.373 (centos7)
      vSphere Plugin 2.27

      The vSphere Cloud Plugin has a template setting called "Clone Name Prefix". The tooltip for this setting says this:

      Controls the name by which the virtual machine will be known to vSphere. The plug-in will append a unique ID to this prefix in order to generate unique names.

      The problem is that the "unique ID" is just a simple number starting at 1 and going up. This is not unique enough. Consider this scenario:

      1. I run a job that spins up an agent named `Jenkins-Agent-1`
      2. The job finishes, `Jenkins-Agent-1` is cleaned up/destroyed.
      3. I run another job, and a completely new agent named `Jenkins-Agent-1` is spun up, recycling the old name.

      This is a problem with any systems that store the node name in an external place (like the P4 Plugin, which creates a client name based on the node name). If I were to follow the pattern above, I would encounter failures because the node name is being recycled.

      The vSphere plugin should have a more unique hash appended to the end of the name. Maybe the timestamp of when the agent was launched? Alternately, if we could put variables into that setting to achieve the same purpose.

            Unassigned Unassigned
            jazzyjayx Jay Spang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: