-
New Feature
-
Resolution: Unresolved
-
Minor
-
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:
- I run a job that spins up an agent named `Jenkins-Agent-1`
- The job finishes, `Jenkins-Agent-1` is cleaned up/destroyed.
- 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.