Skip to content

Alter how the new router metrics / health endpoint overrides stats - #14790

Merged
openshift-bot merged 4 commits into
openshift:masterfrom
smarterclayton:router_metrics_port
Jun 23, 2017
Merged

openshift-bot merged 4 commits into
openshift:masterfrom
smarterclayton:router_metrics_port

Conversation

@smarterclayton

Copy link
Copy Markdown
Contributor

When router metrics (new style) are on the stats port is completely disabled and replaced by a healthz endpoint in the openshift-router process. This moves in the direction of having more comprehensive health checking for the router (including the informer) in a backwards compatible fashion. Router templates that wish to preserve the stats port should do so, but will not be able to receive new style metrics.

Health checks are now PROXY aware and tied to the public HTTP port. A router template that has no public HTTP endpoint can still expose their own stats port as needed and customize ROUTER_METRICS_READY_HTTP_URL to point to it.

Fixes #14759

Should be part of 3.6.0 to avoid having to ship double port support.

[test]

@smarterclayton

smarterclayton commented Jun 21, 2017 •

Copy link
Copy Markdown
Contributor Author

@knobunc I don't see any PROXY test cases - I verified this manually in both modes, but it would be good to ensure we have some future tests in this direction. Might be enough to do:

  1. deploy router
  2. verify up
  3. enable proxy protocol
  4. verify deployment succeeds and comes back (also test PROXY endpoint)
  5. disable metrics port
  6. verify deployment succeeds and comes back (also test PROXY endpoint)
  7. disable proxy protocol
  8. verify deployment succeeds and comes back

@smarterclayton

Copy link
Copy Markdown
Contributor Author

Almost forgot, ROUTER_LISTEN_ADDR now overrides stats port (and docs mention that)

reload-haproxy now checks and validates against the public backend.
This change may affect some custom haproxy-config templates that also
disable the stats port - otherwise this is net new behavior.
Adds a custom health checker that calls through to the default template
health check (when stats port is -1), and allows that to be customized
via the env var `ROUTER_METRICS_READY_HTTP_URL`. Use a valid check
for both the proxy protocol and normal HTTP.

A customizer who doesn't want to expose a public HTTP port should
override the env var to point to their own stats port.

@knobunc knobunc left a comment

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.

LGTM. I'll see about getting tests.

@knobunc

knobunc commented Jun 21, 2017

Copy link
Copy Markdown
Contributor

[test][testextended][extended: networking]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 778c6d4

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin testextended up to 778c6d4

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/681/) (Base Commit: 7461c10) (PR Branch Commit: 778c6d4) (Extended Tests: networking)

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2481/) (Base Commit: 7461c10) (PR Branch Commit: 778c6d4)

@smarterclayton

Copy link
Copy Markdown
Contributor Author

This has gotten all greens [severity:blocker][merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 778c6d4

@smarterclayton

Copy link
Copy Markdown
Contributor Author

@jupierce this blocks starter

@openshift-bot

openshift-bot commented Jun 23, 2017 •

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/1101/) (Base Commit: 75c6d6e) (PR Branch Commit: 778c6d4) (Extended Tests: blocker) (Image: devenv-rhel7_6393)

@sdodson

sdodson commented Jun 26, 2017

Copy link
Copy Markdown
Member

Any chance this caused #14871 ? every openshift-ansible pr is failing now but I imagine the fix is we need to update something there?

@smarterclayton

smarterclayton commented Jun 26, 2017 via email

Copy link
Copy Markdown
Contributor Author

@smarterclayton

Copy link
Copy Markdown
Contributor Author

@sdodson job should be fixed in #14889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants