-
Notifications
You must be signed in to change notification settings - Fork 185
Reconcile remote datacenters independently #2535
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
Reconcile remote datacenters independently #2535
Conversation
@zimnx: GitHub didn't allow me to request PR reviews from the following users: zimnx. Note that only scylladb members and repo collaborators can review this PR, and authors cannot review their own PRs. 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-sigs/prow repository. |
b3235c0
to
433e060
Compare
057822f
to
61cac51
Compare
61cac51
to
110646f
Compare
110646f
to
f8a89a1
Compare
d4b239d
to
978ed02
Compare
9519be5
to
edf2b32
Compare
15fbeb0
to
606e28a
Compare
clean rebase to pick up dependent PRs, ready to review |
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.
My overall perspective - not reflected in the attached comments - is that the MakeRemoteXXX
functions encapsulate significant logic in a way that (1) is not clear from the function name/signature, (2) vastly differs between types.
Attaching some comments, but in subsequent rounds I would like to get the function signatures (including mostly nonexistent docstrings) more in check with what actually the logic is.
606e28a
to
645b2c5
Compare
645b2c5
to
2a9c192
Compare
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.
one minor comment and a nit
lgtm, but I second most of Michal's comments
/assign mflendrich
@@ -6,6 +6,9 @@ import ( | |||
"sort" | |||
"strings" | |||
|
|||
apierrors "k8s.io/apimachinery/pkg/api/errors" | |||
"k8s.io/apimachinery/pkg/util/errors" | |||
|
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.
blank line sneaked in
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.
fixed
} | ||
|
||
metaCluster := f.Cluster(0) | ||
sc, err = f.ScyllaClient().ScyllaV1alpha1().ScyllaDBClusters(f.Namespace()).Create(ctx, sc, metav1.CreateOptions{}) |
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.
nit: for clarity, shouldn't this use metaCluster
instead of f
directly as well?
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.
indeed, done
2a9c192
to
b49b98c
Compare
Refactors ScyllaDBCluster controller to reconcile each datacenter independenly. Errors or connection issues of down datacenter no longer affects reconcilation of other datacenter.
2e55354
to
5cdaf62
Compare
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.
The post-merge cleanup refactor promise, as decided in #2535 (comment), addresses my code health concern.
Two comments left, otherwise lgtm.
5cdaf62
to
93e4f72
Compare
…center Existing Controller Conditions were changed to represent status of reconcilation of particular Datacenter. On top of these, aggregated per Datacenter Conditions were added.
Test verifies if Operator is able to reconcile healthy datacenters when any is down, and whether it fully reconciles the cluster when down DC is restored.
93e4f72
to
fd2b043
Compare
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
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mflendrich, zimnx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Refactors ScyllaDBCluster controller to reconcile each datacenter independenly.
Errors or connection issues of down datacenter no longer affects reconcilation of other datacenter.
Requires:
Fixes #2494