-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add an intermediate Machine state for non-atomic Cloud Provider APIs #444
Comments
Also, we should update the status on machine object right before VM creation request is made ot the provider. |
Hi @zuzzas , I thought a little deeper about the issue which you have raised. I see two separate requirements here, correct me if I understood it wrongly.
Although the above-mentioned logic is achievable with the OOT IMO, however one small caveat I observe is that the OOT currently would delete such partially created machines bcoz of the machineSet controller that deletes failed machines. However, the fix I see for this would be to keep the machine in a
If your requirement is only (1), that is VM creation with multiple rounds of Also, these are just some thoughts I have tried to pen down, please correct me if I am wrong here or something can be improved? |
Hi @prashanth26, Thanks for a thorough response. Yeah, the first point seems feasible and is exactly what I require. The reason for #538 is that I still use in-tree providers. It was an attempt to create a simple interim solution, which simply removes the Machine and restarts the creation flow. That helps us with not adopting half-created Machines, which were created as a VM, but failed to add Security Groups to its interfaces. |
But wouldn't this case lead to orphan VMs in your case? Anyways you can identify VMs using the tags right. IMO, you can capture this case in the driver Create() call and either fix the partially/adopt created VM (or) probably try to perform cleanup on calling the cc: @hardikdr @ggaurav10 @amshuman-kr WDYT? |
This happens after adoption. If a VM was created (without setting up other important stuff, like SGs in OpenStack), the |
@zuzzas We are in the middle of moving from the in-tree providers to the out-of-tree providers. The existing in-tree providers are in different stages of being moved to the out-of-tree approach. As mentioned above by @prashanth26, the out-of-tree approach proposes to use the Clearly, something like this doesn't exist in the in-tree approach. But considering that the in-tree approach is being phased out, we are a bit reluctant to introduce new functionality in the in-tree approach. Would it work for you to do this in the out-of-tree approach? Also, do you see any problems in using the |
Nah, everything is clear. I've been unsure about the current policy of changing stuff in the in-tree controller. Thanks, @amshuman-kr.
It's perfect. |
This has been taken care with this field. |
What would you like to be added:
An intermediate Machine state for non-atomic Cloud Provider APIs. After VM creation is complete, apply a second wave of changes to the machine. Consider Machine Ready only after all API calls are complete.
Why is this needed:
There are some API methods in some of the Cloud Provider's APIs that require performing a second (after the creation of a VM) API call to change some parameters. A perfect (and dear to my heart) example is setting the
source-dest-check
option on AWS instances.If MCM is restarted (or somehow lost internal state), the second non-atomic call to the Cloud Provider's API would never be made.
The text was updated successfully, but these errors were encountered: