-
Notifications
You must be signed in to change notification settings - Fork 117
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
VM Instance Initialization: Driver.InitializeMachine #898
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes requested. please address them
@@ -407,6 +410,7 @@ func (c *controller) triggerCreationFlow(ctx context.Context, createMachineReque | |||
klog.Errorf("Error while creating machine %s: %s", machine.Name, err.Error()) | |||
return c.machineCreateErrorHandler(ctx, machine, createMachineResponse, err) | |||
} | |||
newlyCreatedMachine = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I would suggest to move newlyCreatedMachine = true
to the end of the block.
@@ -407,6 +410,7 @@ func (c *controller) triggerCreationFlow(ctx context.Context, createMachineReque | |||
klog.Errorf("Error while creating machine %s: %s", machine.Name, err.Error()) | |||
return c.machineCreateErrorHandler(ctx, machine, createMachineResponse, err) | |||
} | |||
newlyCreatedMachine = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the newlyCreatedMachine
variable and just use uninitializedMachine
. Set uninitializedMachine
to true
after the VM creation is successful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor changes needed. Rest looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@@ -267,6 +325,7 @@ If the conditions defined below are encountered, the provider MUST return the sp | |||
| 13 INTERNAL | Major error | Means some invariants expected by underlying system has been broken. If you see one of these errors, something is very broken. | Needs manual intervension to fix this | N | | |||
| 14 UNAVAILABLE | Not Available | Unavailable indicates the service is currently unavailable. | Retry operation after sometime | Y | | |||
| 16 UNAUTHENTICATED | Missing provider credentials | Request does not have valid authentication credentials for the operation | Fix the provider credentials | N | | |||
| 17 UNINITIALIZED | Failed Initialization| VM Instance could not be initializaed | Initialization is reattempted in next reconcile cycle | N | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initializaed
initialized
| 13 INTERNAL | Major error | Means some invariants expected by underlying system has been broken. | Needs investigation and possible intervention to fix this | Y | | ||
| 17 UNINITIALIZED | Failed Initialization| VM Instance could not be initializaed | Initialization is reattempted in next reconcile cycle | Y | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 13 INTERNAL | Major error | Means some invariants expected by underlying system has been broken. | Needs investigation and possible intervention to fix this | Y |
In practice not many will make a distinction between uninitialized and internal - why would they since both errors are retryable. If there is a difference in the requeue time maybe but. Saying Needs investigation and possible intervention to fix this
and still allowing retries does not make sense. I think we could live without the "uninitialized" error per the spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Konstantinos, We need the Uninitialized
error code to disambiguate the specific case of an un-initialized machine. The Internal
error code is more like a generic error code in the MCM presently.
Maybe you are right and we can remove codes.Internal
from the response error codes for InitializeMachine
to be more strict and not lenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But how should I, as a extension maintainer differentiate ? What is an example use-case ? Maybe it can be added in the description
What this PR does / why we need it:
See #871
Enhance the Machine Controller
triggerCreationFlow
to correctly handle post-creation instance initialization steps with appropriate retry handling.Which issue(s) this PR fixes:
Fixes part of #871
Special notes for your reviewer:
Release note: