Skip to content

[JENKINS-44796] Robustness improvements#85

Merged
pjdarton merged 1 commit intojenkinsci:masterfrom
pjdarton:robustness
Aug 21, 2017
Merged

[JENKINS-44796] Robustness improvements#85
pjdarton merged 1 commit intojenkinsci:masterfrom
pjdarton:robustness

Conversation

@pjdarton
Copy link
Copy Markdown
Member

@pjdarton pjdarton commented Aug 15, 2017

vSphere has a failure mode whereby the clone-and-power-on operation can successfully clone but then fail to power-on.
This can then result in us having a VM in vSphere that we think we failed to create, so we would later "collide" with it.
This can also result in us having a VM in vSphere without the meta-data (stored in the extra-config) that we rely upon to recognize our own VMs, causing us to fail to recognize it as "one of ours" when we do later "collide" with it, meaning that the code introduced in #73 fails to trigger.

The solution is to ensure that the VM is created with the meta-data from the outset, and to always try to delete any VM that didn't create properly (even if vSphere tells us it didn't get created).

Bugfix: vSphereCloudSlaveTemplate.provision method now ensures that it always disconnects from vSphere.  Previously there were some error cases where this might not happen.
Refactor: vSphereCloudSlaveTemplate.provision method now passes in the extra config parameters when the VM is initially created (instead of as a second vSphere operation).  This ensures that the meta-data (that we rely on for recognizing our own VMs) is there from the outset and hence we should now be less vulnerable to vSphere failing to power-on the VM after cloning it or to vSphere belatedly starting a VM it claimed to have failed to create.
Enhancement: If vSphereCloudSlaveTemplate.provision method failed to clone a new VM, we now attempt to delete the VM, as vSphere can partially-create a VM.
Enhancement: VSphere.cloneOrDeployVm method can (optionally) now set extra config parameters.
@pjdarton pjdarton changed the title Robustness improvements [JENKINS-44796] Robustness improvements Aug 15, 2017
@pjdarton pjdarton merged commit 894d449 into jenkinsci:master Aug 21, 2017
@pjdarton pjdarton deleted the robustness branch August 22, 2017 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant