Fixes "failed to create VM instance" error#44
Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom Dec 17, 2021
Merged
Fixes "failed to create VM instance" error#44k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
Conversation
Signed-off-by: David Vossel <davidvossel@gmail.com>
…ation Signed-off-by: David Vossel <davidvossel@gmail.com>
a205f7b to
2a371d4
Compare
Contributor
|
thanks for the fix @davidvossel ! /approve |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: agradouski, davidvossel The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
nunnatsa
pushed a commit
to nunnatsa/cluster-api-provider-kubevirt
that referenced
this pull request
Mar 29, 2023
…ream_2023-01-23-20-55 Auto sync upstream 2023 01 23 20 55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces two changes.
I noticed quite a few
failed to create VM instanceerrors in the logs and found a race condition in our VM creation logic. If we attempt to get a VM's VMI immediately after VM creation, there's a very high chance that get will fail. This is because the VM controller has not had enough time to react to the created VM and create the corresponding VMI object.We don't actually need to check to see if the VMI has been created immediately after the VM is created. Now that the machine controller is checking the
IsReady()function, we'll naturally wait (re-enqueue) the VMI to get recreated before proceeding with the rest of the controllers logic.This pr also introduces some unit tests to verify we re-enqueue after VM creation.