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

reload-haproxy: Use curl --haproxy-protocol #277

Conversation

Miciah
Copy link
Contributor

@Miciah Miciah commented Apr 7, 2021

Use Curl's built-in support for PROXY protocol to replace the use of socat in the reload-haproxy script. The router image has included a version of Curl that supports PROXY protocol for a while now.

  • images/router/haproxy/reload-haproxy: Use curl --haproxy-protocol instead of socat when PROXY protocol is enabled.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2021
@Miciah
Copy link
Contributor Author

Miciah commented Apr 8, 2021

I tested the PR on AWS using cluster-bot (test e2e openshift/router#277 aws): https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-origin-installer-launch-aws/1379939173397434368

Health checks in the router-default-6685855b9c-bvqfm and router-default-6685855b9c-xc75p pods show that the health check logic worked properly:

router.go:579] template "msg"="router reloaded"  "output"=" - Checking http://localhost:80 using PROXY protocol ...\n - Health check ok : 0 retry attempt(s).\n"

@Miciah
Copy link
Contributor Author

Miciah commented Apr 8, 2021

However, the e2e-agnostic job shows incorrect behavior on GCP: the router-default-56f5697fc9-765t7 and router-default-56f5697fc9-mm8h4 pods logged the following:

router.go:579] template "msg"="router reloaded"  "output"=" - Checking http://localhost:80 using PROXY protocol ...\n - Health check ok : 0 retry attempt(s).\n"

Looks like I used ${proxy_opts+...} where I should have used ${proxy_opts:+...}. This is only cosmetic but needs to be fixed...

@Miciah Miciah force-pushed the reload-haproxy-use-curl-dash-dash-haproxy-dash-protocol branch from eb212a1 to 620d3a2 Compare April 8, 2021 00:59
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2021
@openshift-ci-robot
Copy link
Contributor

@Miciah: PR needs rebase.

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/test-infra repository.

@sgreene570
Copy link

This is terrific! Could we make the case to patch this as a bug?

Use Curl's built-in support for PROXY protocol to replace the use of socat
in the reload-haproxy script.  The router image has included a version of
Curl that supports PROXY protocol for a while now.

* images/router/haproxy/reload-haproxy: Use curl --haproxy-protocol instead
of socat when PROXY protocol is enabled.
@Miciah Miciah force-pushed the reload-haproxy-use-curl-dash-dash-haproxy-dash-protocol branch from 620d3a2 to 74864c4 Compare April 15, 2021 15:16
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2021
@Miciah
Copy link
Contributor Author

Miciah commented Apr 15, 2021

Rebased.

@Miciah
Copy link
Contributor Author

Miciah commented Apr 15, 2021

This is terrific! Could we make the case to patch this as a bug?

Possibly? This is more of a cleanup, but I'd be happy to get it in 4.8.

@sgreene570
Copy link

/retest

@Miciah
Copy link
Contributor Author

Miciah commented Jul 19, 2021

/test e2e-upgrade

@frobware
Copy link
Contributor

Nice!
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware, Miciah

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit be4e44e into openshift:master Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants