The current template assumes that websockets are at the base of a URL but that is not true for our buildmaster. This patch adds remotepath to the end of the websocket url if remotepath is defined. --- roles/httpd/reverseproxy/templates/reversepassproxy.conf | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf index deec40b..6131b5d 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf @@ -29,10 +29,18 @@ SSLProxyEngine On <Proxy "balancer://{{balancer_name}}-websocket"> {% for member in balancer_members %} {% if http_not_https_yes_this_is_insecure_and_i_feel_bad %} + {% if remotepath is defined %} + BalancerMember "ws://{{ member }}{{ remotepath }} + {% else %} BalancerMember "ws://{{ member }}" + {% endif %} + {% else %} + {% if remotepath is defined %} + BalancerMember "ws://{{ member }}{{ remotepath }} {% else %} BalancerMember "wss://{{ member }}" {% endif %} + {% endif %} {% endfor %} </Proxy>
+1 the logic looks to be functional
On Tue, 19 Mar 2019 at 18:49, Tim Flink tflink@redhat.com wrote:
The current template assumes that websockets are at the base of a URL but that is not true for our buildmaster. This patch adds remotepath to the end of the websocket url if remotepath is defined.
roles/httpd/reverseproxy/templates/reversepassproxy.conf | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf index deec40b..6131b5d 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf @@ -29,10 +29,18 @@ SSLProxyEngine On <Proxy "balancer://{{balancer_name}}-websocket"> {% for member in balancer_members %} {% if http_not_https_yes_this_is_insecure_and_i_feel_bad %}
- {% if remotepath is defined %}
- BalancerMember "ws://{{ member }}{{ remotepath }}
- {% else %} BalancerMember "ws://{{ member }}"
- {% endif %}
- {% else %}
- {% if remotepath is defined %}
- BalancerMember "ws://{{ member }}{{ remotepath }} {% else %} BalancerMember "wss://{{ member }}" {% endif %}
- {% endif %} {% endfor %}
</Proxy> _______________________________________________ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/infrastructure@lists.fedoraproject.org
On Tue, Mar 19, 2019 at 04:48:11PM -0600, Tim Flink wrote:
The current template assumes that websockets are at the base of a URL but that is not true for our buildmaster. This patch adds remotepath to the end of the websocket url if remotepath is defined.
roles/httpd/reverseproxy/templates/reversepassproxy.conf | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf index deec40b..6131b5d 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf @@ -29,10 +29,18 @@ SSLProxyEngine On <Proxy "balancer://{{balancer_name}}-websocket"> {% for member in balancer_members %} {% if http_not_https_yes_this_is_insecure_and_i_feel_bad %}
- {% if remotepath is defined %}
- BalancerMember "ws://{{ member }}{{ remotepath }}
- {% else %} BalancerMember "ws://{{ member }}"
- {% endif %}
- {% else %}
- {% if remotepath is defined %}
- BalancerMember "ws://{{ member }}{{ remotepath }}
You're missing on 's' here: wss:// (the first if is about unsecure: ws, we're in the else where about secure ws, so wss).
{% else %} BalancerMember "wss://{{ member }}" {% endif %}
- {% endif %} {% endfor %}
</Proxy>
One typo, otherwise +1 for me
Pierre
On Fri, 22 Mar 2019 16:17:55 +0100 Pierre-Yves Chibon pingou@pingoured.fr wrote:
On Tue, Mar 19, 2019 at 04:48:11PM -0600, Tim Flink wrote:
The current template assumes that websockets are at the base of a URL but that is not true for our buildmaster. This patch adds remotepath to the end of the websocket url if remotepath is defined.
roles/httpd/reverseproxy/templates/reversepassproxy.conf | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf index deec40b..6131b5d 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf @@ -29,10 +29,18 @@ SSLProxyEngine On <Proxy "balancer://{{balancer_name}}-websocket"> {% for member in balancer_members %} {% if http_not_https_yes_this_is_insecure_and_i_feel_bad %}
- {% if remotepath is defined %}
- BalancerMember "ws://{{ member }}{{ remotepath }}
- {% else %} BalancerMember "ws://{{ member }}"
- {% endif %}
- {% else %}
- {% if remotepath is defined %}
- BalancerMember "ws://{{ member }}{{ remotepath }}
You're missing on 's' here: wss:// (the first if is about unsecure: ws, we're in the else where about secure ws, so wss).
{% else %} BalancerMember "wss://{{ member }}" {% endif %}
- {% endif %} {% endfor %}
</Proxy>
One typo, otherwise +1 for me
Pierre
Thanks for catching that and the +1. Patch is applied and I'm running it on the stg proxy.
Tim
infrastructure@lists.fedoraproject.org