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

fingerprint: add support for fingerprinting multiple Consul clusters #18392

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

tgross
Copy link
Member

@tgross tgross commented Sep 5, 2023

Add fingerprinting we'll need to accept multiple Consul clusters in upcoming Nomad Enterprise features. The fingerprinter will create a map of Consul clients by cluster name. In Nomad CE, all but the default cluster will be ignored and there will be no visible behavior change.

Ref: https://github.com/hashicorp/team-nomad/issues/404
Note: similar to #18253, I'll need to prep an ENT PR to go with this one

@@ -88,46 +109,61 @@ func (f *ConsulFingerprint) Periodic() (bool, time.Duration) {
return true, 15 * time.Second
Copy link
Member Author

@tgross tgross Sep 5, 2023

Choose a reason for hiding this comment

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

Note for reviewers: unlike #18253, the Consul fingerprint doesn't back off once we've got a successful fingerprint. We probably should do that here too, but I don't want to change the existing behavior in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for this? I mean if we fingerprint successfully, we should back off.

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a reason for this?

If I recall correctly, the original reasoning was that we would change the client's fingerprint if Consul became unavailable. We no longer do that as of 1.4.0 in order to avoid a storm of Node.Register RPCs and tons of load on the Nomad servers whenever someone's Consul cluster is flapping. This had been implicated in a few major customer incidents!

I mean if we fingerprint successfully, we should back off.

It should be safe for us to do so now. I just didn't want to include that in this PR because I want to change one thing at a time. I'll make a follow-up PR for that.

Comment on lines -20 to -23
const (
vaultAvailable = "available"
vaultUnavailable = "unavailable"
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to reviewers: this was dead code after #18253 that I missed

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM, some minor suggestions but nothing blocking.

Copy link
Contributor

@pkazmierczak pkazmierczak left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -88,46 +109,61 @@ func (f *ConsulFingerprint) Periodic() (bool, time.Duration) {
return true, 15 * time.Second
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for this? I mean if we fingerprint successfully, we should back off.

Add fingerprinting we'll need to accept multiple Consul clusters in upcoming
Nomad Enterprise features. The fingerprinter will create a map of Consul clients
by cluster name. In Nomad CE, all but the default cluster will be ignored and
there will be no visible behavior change.

Ref: hashicorp/team-nomad#404
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants