Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/virtual_machine: Roll back all VM post-clone config operations #467

Merged
merged 1 commit into from
Apr 13, 2018

Conversation

vancluever
Copy link
Contributor

Not all VM post-clone operations were being rolled back correctly.
Several config-building operations (namely surrounding device management
and property gathering) were not being sent through the rollback
handler, hence were at risk for causing an irrecoverable state on error.
In addition, the ID was being set too early.

This fixes this by ensuring that all operations that produce errors
that happen from the moment a VM clone is finished, to right before VM
customization, are all sent through the rollback handler.

ID setting has been moved as well to right before customization is done.
This is the earliest place where the VM can be reasonably preserved and
Terraform will not immedately fail upon refresh.

Not all VM post-clone operations were being rolled back correctly.
Several config-building operations (namely surrounding device management
and property gathering) were not being sent through the rollback
handler, hence were at risk for causing an irrecoverable state on error.
In addition, the ID was being set too early.

This fixes this by ensuring that *all* operations that produce errors
that happen from the moment a VM clone is finished, to right before VM
customization, are all sent through the rollback handler.

ID setting has been moved as well to right before customization is done.
This is the earliest place where the VM can be reasonably preserved and
Terraform will not immedately fail upon refresh.
@vancluever vancluever added the bug Type: Bug label Apr 12, 2018
@vancluever vancluever requested a review from a team April 12, 2018 00:46
Copy link
Contributor

@bill-rich bill-rich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vancluever vancluever merged commit 878927b into master Apr 13, 2018
@vancluever vancluever deleted the b-fix-vm-post-clone-config-rollback branch April 26, 2018 17:17
@ghost ghost locked and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants