Skip to content

VM Recreate #2193

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

Closed
wants to merge 1 commit into from
Closed

VM Recreate #2193

wants to merge 1 commit into from

Conversation

furkansahin
Copy link
Contributor

@furkansahin furkansahin commented Nov 5, 2024

This pr adds a new logic to Vm::Nexus to be able to recreate a VM. For
now, this is only available to the on-call. In case we realize the VM is
stuck in the provisioning path, the on-call may simply incr_recreate and
force the VM to be recreated including new storage entities, ip
configuration, etc. In future, we may automate this process further and
even add features like excluding the previously tried host. For now,
this is a very basic implementation.

@furkansahin furkansahin changed the title VM Recreate logic VM Recreate Nov 5, 2024
@furkansahin furkansahin force-pushed the vm_recreate branch 3 times, most recently from 11fc8fe to e1e1423 Compare November 7, 2024 13:11
@furkansahin furkansahin requested a review from fdr November 8, 2024 08:36
@fdr fdr force-pushed the vm_recreate branch 2 times, most recently from da4da1e to 846de1b Compare November 16, 2024 01:50
@furkansahin furkansahin force-pushed the vm_recreate branch 2 times, most recently from e9aabfa to 89b31af Compare November 18, 2024 16:22
@furkansahin
Copy link
Contributor Author

@fdr , I squashed your commit.

Copy link
Collaborator

@fdr fdr left a comment

Choose a reason for hiding this comment

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

that recreate method seems a little smelly, surely it must be duplicating a bunch of stuff as features are added. What's preventing us from looping back to the creation state and not doing quite so much? i.e. why is re-create different enough from "create" as it comes to those resources?

@furkansahin
Copy link
Contributor Author

@fdr , I have moved around some of the code, I think this makes more sense now. The problem I have is that some of the entities we generated need to be destroyed and recreated. We depend on plugins to destroy some of them. That's why the struggle.

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

I reviewed from a Ruby code perspective, and the changes seem fine to me.

This pr adds a new logic to Vm::Nexus to be able to recreate a VM. For
now, this is only available to the on-call. In case we realize the VM is
stuck in the provisioning path, the on-call may simply incr_recreate and
force the VM to be recreated including new storage entities, ip
configuration, etc. In future, we may automate this process further and
even add features like excluding the previously tried host. For now,
this is a very basic implementation.
@furkansahin
Copy link
Contributor Author

@fdr @jeremyevans , may I have a round of review?

Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

I don't see any issues with the Ruby code.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants