haproxy manifest is not compatible with haproxy 2.4

Bug #1942675 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Michele Baldessari

Bug Description

With haproxy 2.4 we get the following error:
<13>Sep 4 08:07:08 puppet-user: Warning: Scope(Haproxy::Config[haproxy]): haproxy: The $merge_options parameter will default to true in the next major release. Please review the documentation regarding the implications.
<13>Sep 4 08:07:09 puppet-user: Notice: Compiled catalog for undercloud-0.home.arpa in environment production in 0.63 seconds
<13>Sep 4 08:07:09 puppet-user: Error: Execution of '/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg20210904-13-18ckjh5 -c' returned 1: [NOTICE] (34) : haproxy version is 2.4.3-4dd5a5a
<13>Sep 4 08:07:09 puppet-user: [NOTICE] (34) : path to executable is /usr/sbin/haproxy
<13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:44] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
<13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:58] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
<13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:81] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
<13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:101] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
<13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg20210904-13-18ckjh5

rsprep directive has been removed:
https://www.haproxy.com/blog/haproxy-2-1/#deprecated-configuration-options

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-tripleo (master)
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-tripleo (master)

Reviewed: https://review.opendev.org/c/openstack/puppet-tripleo/+/807428
Committed: https://opendev.org/openstack/puppet-tripleo/commit/5a9b957a7e6b9cefe820c391e0b53f3c7a73bd16
Submitter: "Zuul (22348)"
Branch: master

commit 5a9b957a7e6b9cefe820c391e0b53f3c7a73bd16
Author: Michele Baldessari <email address hidden>
Date: Sat Sep 4 10:52:56 2021 +0200

    Replace rsprep directive with http-response replace-header

    Haproxy 2.4.x errors out when using rsprep directive:
    <13>Sep 4 08:07:09 puppet-user: [NOTICE] (34) : path to executable is /usr/sbin/haproxy
    <13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:44] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
    <13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:58] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
    <13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:81] : The 'rsprep' directive is not supported

    Tested with haproxy 2.4 and now the config is accepted by haproxy -c.
    The rsprep directive has been removed in 2.1:
    https://www.haproxy.com/blog/haproxy-2-1/#deprecated-configuration-options

    Tested this by deploying an overcloud with tls-e and this patch and
    verifying that tempest still works.

    The config lines now look like the following:

      http-response replace-header Location http://(.*) https://\1
      http-response replace-header Location http://10.0.0.5(.*) https://10.0.0.5\1

    Tested the horizon redirect is still working:
    [stack@undercloud-0 ~]$ curl -v -L http://overcloud.localdomain:80/
    * Trying 10.0.0.5:80...
    * Connected to overcloud.localdomain (10.0.0.5) port 80 (#0)
    > GET / HTTP/1.1
    > Host: overcloud.localdomain
    > User-Agent: curl/7.76.1
    > Accept: */*
    >
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 301 Moved Permanently
    < content-length: 0
    < location: https://overcloud.localdomain/

    Closes-Bug: #1942675

    Change-Id: Ie29a03affbbf8d6d47a5c50ef1c17bab9847f460

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-tripleo (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/puppet-tripleo/+/810050

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-tripleo (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/puppet-tripleo/+/810050
Committed: https://opendev.org/openstack/puppet-tripleo/commit/e83c472149ea38f7189b0d993b52d866c62b36bd
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit e83c472149ea38f7189b0d993b52d866c62b36bd
Author: Michele Baldessari <email address hidden>
Date: Sat Sep 4 10:52:56 2021 +0200

    Replace rsprep directive with http-response replace-header

    Haproxy 2.4.x errors out when using rsprep directive:
    <13>Sep 4 08:07:09 puppet-user: [NOTICE] (34) : path to executable is /usr/sbin/haproxy
    <13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:44] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
    <13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:58] : The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.
    <13>Sep 4 08:07:09 puppet-user: [ALERT] (34) : parsing [/etc/haproxy/haproxy.cfg20210904-13-18ckjh5:81] : The 'rsprep' directive is not supported

    Tested with haproxy 2.4 and now the config is accepted by haproxy -c.
    The rsprep directive has been removed in 2.1:
    https://www.haproxy.com/blog/haproxy-2-1/#deprecated-configuration-options

    Tested this by deploying an overcloud with tls-e and this patch and
    verifying that tempest still works.

    The config lines now look like the following:

      http-response replace-header Location http://(.*) https://\1
      http-response replace-header Location http://10.0.0.5(.*) https://10.0.0.5\1

    Tested the horizon redirect is still working:
    [stack@undercloud-0 ~]$ curl -v -L http://overcloud.localdomain:80/
    * Trying 10.0.0.5:80...
    * Connected to overcloud.localdomain (10.0.0.5) port 80 (#0)
    > GET / HTTP/1.1
    > Host: overcloud.localdomain
    > User-Agent: curl/7.76.1
    > Accept: */*
    >
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 301 Moved Permanently
    < content-length: 0
    < location: https://overcloud.localdomain/

    Closes-Bug: #1942675

    Change-Id: Ie29a03affbbf8d6d47a5c50ef1c17bab9847f460
    (cherry picked from commit 5a9b957a7e6b9cefe820c391e0b53f3c7a73bd16)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo 16.0.0

This issue was fixed in the openstack/puppet-tripleo 16.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.