composable haproxy configuration fails

Bug #1743626 reported by Michael Henkel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Juan Antonio Osorio Robles

Bug Description

Description
===========

haproxy allows to add custom configuration by defining it in a service template:

        haproxy:
          tripleo.contrail_webui.haproxy_endpoints:
            contrail_webui:
              public_virtual_ip: "%{hiera('contrail_webui_vip')}"
              internal_ip: "%{hiera('contrail_webui_vip')}"
              service_port: 8143
              ip_addresses: "%{hiera('contrail_webui_node_ips')}"
              server_names: "%{hiera('contrail_webui_node_names')}"
              mode: 'http'
              listen_options:
                balance:
                  - 'source'
                hash-type:
                  - 'consistent'
              public_ssl_port: 8143
              service_network: {get_param: [ServiceNetMap, ContrailWebuiNetwork]}
              member_options:
                list_concat:
                  - [ 'check', 'inter 2000', 'rise 2', 'fall 5' ]
                  - if:
                      - internal_tls_enabled
                      - - 'ssl'
                        - 'verify required'
                        - list_join:
                          - ' '
                          - - 'ca-file'
                            - {get_param: InternalTLSCAFile}
                        - list_join:
                          - ' '
                          - - 'crl-file'
                            - {get_param: InternalTLSCRLPEMFile}
                      - null

Expected result
===============

Working haproxy configuration

Actual result
=============

deployment fails because of server_names: "%{hiera('contrail_webui_node_names')}" and ip_addresses: "%{hiera('contrail_webui_node_ips')}" are interpreted as strings rather than arrays:

Notice: /Stage[main]/Tripleo::Haproxy/Tripleo::Haproxy::Service_endpoints[contrail_config]/Tripleo::Haproxy::Endpoint[contrail_config_api]/Notify[contrail_config_api]/message: defined 'message' as '["overcloud-contrailcontroller-0.internalapi.localdomain"]'
Notice:
Notice: /Stage[main]/Tripleo::Haproxy/Tripleo::Haproxy::Service_endpoints[contrail_webui]/Tripleo::Haproxy::Endpoint[contrail_webui]/Notify[contrail_webui]/message: defined 'message' as ''
Error: Execution of '/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg20180116-4645-83cze4 -c' returned 1: [ALERT] 015/110953 (4913) : parsing [/etc/haproxy/haproxy.cfg20180116-4645-83cze4:53] : character '[' is not permitted in server name '["overcloud-contrailcontroller-0.internalapi.localdomain"]'.

Changed in tripleo:
assignee: nobody → Juan Antonio Osorio Robles (juan-osorio-robles)
status: New → In Progress
Changed in tripleo:
importance: Undecided → Medium
milestone: none → queens-3
Changed in tripleo:
milestone: queens-3 → queens-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on puppet-tripleo (master)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: master
Review: https://review.openstack.org/531378
Reason: Gate resets is causing issue to land a critical patch (538346) - I need to clear the gate until 538346 is merged. Please do not restore this patch, I'll take care of it.

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

Reviewed: https://review.openstack.org/531378
Committed: https://git.openstack.org/cgit/openstack/puppet-tripleo/commit/?id=5a51ec58b4d7f493171f102cc351565939e57543
Submitter: Zuul
Branch: master

commit 5a51ec58b4d7f493171f102cc351565939e57543
Author: Juan Antonio Osorio Robles <email address hidden>
Date: Fri Jan 5 16:06:09 2018 +0200

    Haproxy endpoint resource: set defaults for server_names and IPs

    It's not trivial to set the server names and IP addresses for dynamic
    haproxy endpoints due to the fact that hiera renders the array as a
    string. In order to make this work, we try to be clever and get the
    server names and IPs from hiera directly as a default value. This should
    work as long as the endpoint uses the same name as the service.

    Closes-Bug: #1743626
    Change-Id: I51eebfeceb5915fb0add8332c50386f6df93dca5

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

This issue was fixed in the openstack/puppet-tripleo 8.3.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.