-
Notifications
You must be signed in to change notification settings - Fork 431
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
Parallel reconciliation of azure resources #1181
Comments
@shysank: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Another thing we should consider doing more of is #1067 for other resources. A lot of these create operations are long running and we don't need to be block everything else while the resource creates. We can start the create and then exit the controller loop right away and come back later to check if the operation is done. This also allows us to deal with a lot more objects concurrently (imagine you're trying to create 500 nodes, having the controller be able to kickstart the create and then circle back is a lot more efficient than having to wait for each one to be done before exiting the controller loop). |
Yeah, the ideal solution is probably a combination of both. We could use #1067 for long running operations (vm create), and go routines for relatively shorter ones. Or another thing we can do is to just timeout all operations longer than 5 seconds (let's say), update future data, and return control. This will mean only the reconciliation during create will be async, the subsequent ones will mostly be synchronous. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle rotten |
my $0.02 is that it would be helpful to use goroutines for all operations. if that were done:
this kind of thing would build on #1067. async operations can still happen, but the synchronous boundary would be the goroutine, and if you run N goroutines, then their termination point is when all operations are done, including synchronous ones. here's what such an API could look like: type operation struct {
// the action to take
action func() error
// the unique ID of this operation
id uuid.UUID
// if set, run this operation after the one identified by this ID
after uuid.UUID
}
func newAzureMachineOperation(after operation) operation {
//...
}
// other constructors for operations go here...
type workflowEngine interface{
submitOperation(ctx context.Context, workflowID uuid.UUID, op operation)
finalize(ctx context.Context, workflowID uuid.UUID) []error
} if a single instance of |
Thanks @CecileRobertMichon - that was very illuminating! Is it too late to comment on the proposal? |
@CecileRobertMichon great, thanks for letting me know! I'm gonna work to get #1575 done and then I'll drop in and see where this effort is, and how I can help 👍 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@CecileRobertMichon now that we are following async pattern for reconcile/delete of services, can we close this one? |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind feature
/kind explore
What steps did you take and what happened:
We reconcile serially a bunch of resources in azurecluster and azuremachine reconcilers. Some of these resources have no dependency on each other, and can be reconciled simultaneously. Eg. After a vm is reconciled, vmextensions, tags and roleassignments can be reconciled simultaneously, and potentially save some time.
Describe the solution you'd like
Reconcile mutually exclusive services in parallel using goroutines and channels.
Anything else you would like to add:
This is more of an exploration than an actual requirement.
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: