Skip to content
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

Refactor operator reconcilliation flow #115

Open
l0kix2 opened this issue Feb 6, 2024 · 2 comments
Open

Refactor operator reconcilliation flow #115

l0kix2 opened this issue Feb 6, 2024 · 2 comments
Assignees
Labels
assigned Issue has an assignee

Comments

@l0kix2
Copy link
Collaborator

l0kix2 commented Feb 6, 2024

Currently we have an implementation where ytsaurus cluster update flow is hard to understand because it is rather complex and scattered across codebase. As a consequence it is error-prone, hard to maintain and operate on real clusters.

We want to simplify things by implementing an approach where components will be brought to the desired state one after another in strict linear sequence. I.e each reconciliation loop will go through that (well known and explicitly described in a single place of the codebase) sequence, find first component which is NOT in desired state and execute one action which should bring that component closer to the desired state.

We expect that such flow would be easier to understand and also it would be easy to troubleshoot in what stage of update operator and cluster currently are.

As a downside of the approach we expect that linear update of components would be slower, which is might be thing to improve in the future.

@l0kix2
Copy link
Collaborator Author

l0kix2 commented Oct 25, 2024

Here I suggest we touch the components itself as little as possible to keep change simpler and only rewrite manager in sync.go.
I think we should have two flows: creating (Initializing state) and updating (Updating state). Reconcfiguration may be merged with Updating for simplicity of code and everything.
Flows are both linear, but in creating master goes first and in updating master goes last.
At one point in time ytop should update only one component (UpdatingComponents list is always consist of one component) if it allowed by updateSelector and move to the next one after.

@l0kix2
Copy link
Collaborator Author

l0kix2 commented Nov 21, 2024

After today's discussion #396 it seems that we still need 2 update flows: full (as it works now with all pre-steps, after that all pods are removed and after that all after steps) and linear (where only pods of one component are removed at each moment of flow).
I guess we can introduce some flow steps and build 2 different update flows (and create flow i guess) using them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned Issue has an assignee
Projects
Status: No status
Development

No branches or pull requests

2 participants