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

Replace cluster periodics with watchers #9609

Merged
merged 8 commits into from
Jan 19, 2022

Conversation

rosstimothy
Copy link
Contributor

@rosstimothy rosstimothy commented Dec 31, 2021

Remove periodically sending locks and certificate authorities to leaf clusters. Instead
we can rely on the watcher system to only deliver resources to leaf clusters when changes occur.

Fixes #8817

@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch 2 times, most recently from f5d5c7f to 0ad9b7b Compare December 31, 2021 19:32
@rosstimothy rosstimothy added scale Changes required to achieve 100K nodes per cluster. scalability labels Dec 31, 2021
@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch from 0ad9b7b to 32e9a28 Compare January 4, 2022 16:31
@rosstimothy rosstimothy marked this pull request as ready for review January 4, 2022 16:31
@github-actions github-actions bot requested review from greedy52 and zmb3 January 4, 2022 16:32
integration/integration_test.go Show resolved Hide resolved
lib/services/watcher.go Show resolved Hide resolved
integration/integration_test.go Show resolved Hide resolved
lib/reversetunnel/remotesite.go Outdated Show resolved Hide resolved
lib/services/authority.go Outdated Show resolved Hide resolved
lib/services/watcher.go Show resolved Hide resolved
lib/services/watcher.go Outdated Show resolved Hide resolved
@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch 2 times, most recently from 6b69282 to 2dbdd96 Compare January 5, 2022 17:35
}
newHost = make(map[string]types.CertAuthority, len(host))
for _, ca := range host {
newHost[ca.GetName()] = ca
Copy link
Contributor

@greedy52 greedy52 Jan 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ca.GetID() may also be a good option for keys. I think in that case you only need one map too. not big deal. and hopefully when generics come, it will make these conversions easier

lib/services/watcher.go Show resolved Hide resolved
@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch from 2dbdd96 to fdc2603 Compare January 7, 2022 14:10
@russjones
Copy link
Contributor

@rosstimothy @fspmarshall I know that locks have different states they can be in with respect to availability. Does this take that into consideration?

@rosstimothy
Copy link
Contributor Author

@rosstimothy @fspmarshall I know that locks have different states they can be in with respect to availability. Does this take that into consideration?

The LockWatcher will emit types.Event{Type: types.OpUnreliable} if locks become stale. Should we fallback to a periodic update in that case? Or should we not update locks until they become reliable again?

@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch from fdc2603 to 3de91da Compare January 10, 2022 20:54
@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch from e8470de to b77c080 Compare January 18, 2022 19:54
Remove periodically sending locks and certificate authorities to leaf clusters. Instead
we can rely on the watcher system to only deliver resources to leaf clusters when changes
occur.
Fixes #8817
@rosstimothy rosstimothy force-pushed the tross/remove_cluster_periodics branch from b77c080 to 0d381dc Compare January 19, 2022 18:39
@rosstimothy rosstimothy merged commit 8932ed4 into master Jan 19, 2022
@rosstimothy rosstimothy deleted the tross/remove_cluster_periodics branch January 19, 2022 21:53
rosstimothy added a commit that referenced this pull request Jan 27, 2022
* Replace cluster periodics with watchers
Remove periodically sending locks and certificate authorities to leaf clusters. Instead
we can rely on the watcher system to only deliver resources to leaf clusters when changes
occur.

Fixes #8817

(cherry picked from commit 8932ed4)
rosstimothy added a commit that referenced this pull request Feb 1, 2022
* Replace cluster periodics with watchers
Remove periodically sending locks and certificate authorities to leaf clusters. Instead
we can rely on the watcher system to only deliver resources to leaf clusters when changes
occur.

Fixes #8817

(cherry picked from commit 8932ed4)
@webvictim webvictim mentioned this pull request Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scalability scale Changes required to achieve 100K nodes per cluster.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use watcher system for cross cluster periodic updates
4 participants