Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions data/data/gcp/network/lb-private.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,18 @@ resource "google_compute_address" "cluster_ip" {
resource "google_compute_health_check" "api_internal" {
name = "${var.cluster_id}-api-internal"

// CAUTION: the gcp-routes mechanism must be _faster_ than this value:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit,

Can you maybe add docs/dev/gcp readme that details this and point to that file here?

Otherwise this causes noise here...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can put the link into the readme. But I definitely want to keep this warning here. It's too easy to change this and break all the sensitive timing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can put the link into the readme. But I definitely want to keep this warning here. It's too easy to change this and break all the sensitive timing.

// IMPORTANT: <link>

seems like good enough for approvers and reviewers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I do what you suggest. But for the record, I don't think it is clever to move documentation into the readme.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is no readme yet. Feel free to take over this PR and create it. For me this comment is more than adequat.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

since #3537 merged, can we update this PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see how #3537 is related to my added comment. This gcp specific, about their strange network setup. #3537 gives generic timing advice.

//
// Otherwise, local client traffic will go to the GCP LB until the
// gcp-routes mechanism is done rerouting, and therefore back to the
// local node in 1/3 of cases, which is blackholed (due to missing
// hairpinning support).
healthy_threshold = 3
// CAUTION: the gcp-routes mechanism must be _slower_ than this value:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hrm. If both healthy_threshold and unhealthy_threshold are 3, how can the former be faster than the gcp-routes mechanism while the latter is slower than that same gcp-routes mechanism?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

@sttts sttts Jun 10, 2020

Choose a reason for hiding this comment

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

So in theory:

  • 3*2s (LB noticing green readyz) > 1*2s (gcp-routes noticing green readyz)
  • 3*2s (LB noticing red readyz) < 8*2s (gcp-routes noticing red readyz)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

But this might be an issue, cc @squeed:

https://github.com/openshift/machine-config-operator/pull/1670/files#diff-c8e870b664ab100f0b50218e3fdd5d46R143

gcp-routes only polls every 5s. So 1*2s could become 1*2s+5s which is bigger than 3*2s.

//
// Otherwise, local client traffic will go to the GCP LB until the LB
// endpoint is deactived, and therefore back to the local node in 1/3
// of cases, which is blackholed (due to missing hairpinning support).
unhealthy_threshold = 3
check_interval_sec = 2
timeout_sec = 2
Expand Down