Skip to content
Snippets Groups Projects
  1. Jan 11, 2023
  2. Aug 29, 2022
    • Pierre Riteau's avatar
      Support configuring HAProxy services as active/passive · 438ff230
      Pierre Riteau authored
      Instead of specifying a custom member list for each service that should
      be configured as active/passive, a new `active_passive` parameter can be
      set to true. This only works if `custom_member_list` is not used.
      
      Change-Id: I3758bc2377c25a277a29f02ebc20c946c7499093
      438ff230
  3. Jul 29, 2022
    • Mark Goddard's avatar
      haproxy-config: move firewalld reload handler to haproxy role · 492bc744
      Mark Goddard authored
      With the handler in the haproxy-config role, it gets triggered once for
      every service that changes the firewall config. This happens because the
      role is included dynamically. If we move the handler to the haproxy
      role, which is only included once, the handler will trigger at most
      once.
      
      This is a follow up for Iea3680142711873984efff2b701347b6a56dd355.
      
      Change-Id: Iad9ed241026435085bc9a0f5802818010b47830f
      492bc744
    • Mark Goddard's avatar
      haproxy-config: Drop project_name variable · 54391899
      Mark Goddard authored
      This variable shadows the name of the actual project that calls this
      role, so we end up with the following nonsense:
      
        TASK [haproxy-config : Copying over haproxy-config haproxy config]
      
      Change-Id: Id60046e0ddc7ec843f2e4ce7ddee7683470a88b2
      54391899
  4. Jul 27, 2022
    • k-s-dean's avatar
      adds firewalld configuration based on enabled services · 8553e52a
      k-s-dean authored
      This change introduces automated configuration of firewalld and adds
      a new filter for extracting services from the project_services dict.
      the filter selects any enabled services and their haproxy element
      and returns them so they can be iterated over.
      This commit also enables automated configuration of firewalld from enabled
      openstack services and adds them to the defined zone and reloads the
      system firewall.
      
      Change-Id: Iea3680142711873984efff2b701347b6a56dd355
      8553e52a
  5. Jun 30, 2022
  6. Dec 31, 2021
    • Pierre Riteau's avatar
      Move project_name and kolla_role_name to role vars · 56fc74f2
      Pierre Riteau authored
      Role vars have a higher precedence than role defaults. This allows to
      import default vars from another role via vars_files without overriding
      project_name (see related bug for details).
      
      Change-Id: I3d919736e53d6f3e1a70d1267cf42c8d2c0ad221
      Related-Bug: #1951785
      56fc74f2
  7. Oct 11, 2021
  8. Sep 26, 2021
    • Michal Arbet's avatar
      Add way to change weight of haproxy backend per service · 7c2b4bea
      Michal Arbet authored
      This patch adding option to control weight of haproxy
      backends per service via host variable.
      
      Example:
      
      [control]
      server1 haproxy_nova_api_weight=10
      server2 haproxy_nova_api_weight=2 haproxy_keystone_internal_weight=10
      server3 haproxy_keystone_admin_weight=50
      
      If weight is not defined, everything is working as before.
      
      Change-Id: Ie8cc228198651c57f8ffe3eb060875e45d1f0700
      7c2b4bea
  9. Jul 28, 2021
    • LinPeiWen's avatar
      Delete haproxy_single_service_listen.cfg.j2 template · fca9be38
      LinPeiWen authored
      Delete the "haproxy_single_service_listen.cfg.j2" template,
      which has been replaced by "haproxy_single_service_split.cfg.j2"
      and deprecated in the Victoria version
      
      Change-Id: I3599f85afe9d3045820ea1ea70481ea2500e49ac
      fca9be38
  10. Jun 23, 2021
    • Mark Goddard's avatar
      Use ansible_facts to reference facts · ade5bfa3
      Mark Goddard authored
      By default, Ansible injects a variable for every fact, prefixed with
      ansible_. This can result in a large number of variables for each host,
      which at scale can incur a performance penalty. Ansible provides a
      configuration option [0] that can be set to False to prevent this
      injection of facts. In this case, facts should be referenced via
      ansible_facts.<fact>.
      
      This change updates all references to Ansible facts within Kolla Ansible
      from using individual fact variables to using the items in the
      ansible_facts dictionary. This allows users to disable fact variable
      injection in their Ansible configuration, which may provide some
      performance improvement.
      
      This change disables fact variable injection in the ansible
      configuration used in CI, to catch any attempts to use the injected
      variables.
      
      [0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars
      
      Change-Id: I7e9d5c9b8b9164d4aee3abb4e37c8f28d98ff5d1
      Partially-Implements: blueprint performance-improvements
      ade5bfa3
  11. Feb 15, 2021
    • Pedro Henrique's avatar
      Add support to OpenID Connect Authentication flow · f3fbe837
      Pedro Henrique authored
      
      This pull request adds support for the OpenID Connect authentication
      flow in Keystone and enables both ID and access token authentication
      flows. The ID token configuration is designed to allow users to
      authenticate via Horizon using an identity federation; whereas the
      Access token is used to allow users to authenticate in the OpenStack CLI
      using a federated user.
      
      Without this PR, if one wants to configure OpenStack to use identity
      federation, he/she needs to do a lot of configurations in the keystone,
      Horizon, and register quite a good number of different parameters using
      the CLI such as mappings, identity providers, federated protocols, and
      so on. Therefore, with this PR, we propose a method for operators to
      introduce/present the IdP's metadata to Kolla-ansible, and based on the
      presented metadata, Kolla-ansible takes care of all of the
      configurations to prepare OpenStack to work in a federated environment.
      
      Implements: blueprint add-openid-support
      Co-Authored-By: default avatarJason Anderson <jasonanderson@uchicago.edu>
      Change-Id: I0203a3470d7f8f2a54d5e126d947f540d93b8210
      f3fbe837
  12. Nov 10, 2020
  13. Sep 22, 2020
    • Radosław Piliszek's avatar
      Add support for with_frontend and with_backend · 3916c156
      Radosław Piliszek authored
      This allows for more config flexibility - e.g. running multiple
      backends with a common frontend.
      
      Note this is a building block for future work on letsencrypt
      validator (which should offer backend and share frontend with
      any service running off 80/443 - which would be only horizon
      in the current default config), as well as any work towards
      single port (that is single frontend) and multiple services
      anchored at paths of it (which is the new recommended default).
      
      Change-Id: Ie088fcf575e4b5e8775f1f89dd705a275725e26d
      Partially-Implements: blueprint letsencrypt-https
      3916c156
    • Radosław Piliszek's avatar
      Change the default haproxy template to split variant · 9451ac61
      Radosław Piliszek authored
      This allows for more config flexibility - e.g. running multiple
      backends with a common frontend.
      It is not possible with the 'listen' approach (which enforces
      frontend).
      Additionally, it does not really make sense to support two ways
      to do the exact same thing as the process is automated and
      'listen' is really meant for humans not willing to write separate
      sections.
      Hence this deprecates 'listen' variant.
      
      At the moment both templates work exactly the same.
      The real flexibility comes in following patches.
      
      Note this is a building block for future work on letsencrypt
      validator (which should offer backend and share frontend with
      any service running off 80/443 - which would be only horizon
      in the current default config), as well as any work towards
      single port (that is single frontend) and multiple services
      anchored at paths of it (which is the new recommended default).
      
      Change-Id: I2362aaa3e8069fe146d42947b8dddf49376174b5
      Partially-Implements: blueprint letsencrypt-https
      9451ac61
    • Radosław Piliszek's avatar
      Fix default mode in haproxy_single_service_split · a45ef7cc
      Radosław Piliszek authored
      haproxy_single_service_listen (the default template) was already fine.
      
      Closes-Bug: #1896591
      TrivialFix
      
      Change-Id: Id68fe19ea87565aa36fb74f2a2ca66cb951169f6
      a45ef7cc
  14. Apr 21, 2020
    • Christian Berendt's avatar
      Avoid multiple haproxy restarts after reconfiguration · 1efe0fe3
      Christian Berendt authored
      The haproxy role and the site.yml file calls the
      haproxy-config role to provide configuration for individual
      services.
      
      If the configuration within a service changes, the haproxy
      container is restarted.
      
      If the configuration in n services changes, there will be n
      restarts. This is not necessary, a restart at the end is
      sufficient.
      
      By removing the handler from the haproxy-config role and
      using the listen parameter in the handler of the haproxy role,
      the handler is executed only once.
      
      Change-Id: I535fe67579fb748093bb4b30a6bd31b81e021a1b
      Closes-Bug: #1864810
      1efe0fe3
  15. Apr 14, 2020
    • Jason Anderson's avatar
      [haproxy-config] Fix missing servers in split cfg · 6d00236e
      Jason Anderson authored
      When using the split config style, all backends would be empty, which
      meant that HAProxy was unable to serve any traffic. This turned out to
      be due to a bad default in the split config template.
      
      Closes-Bug: #1872545
      Change-Id: I952e526e735e1d31445963f04d41d66bbdbfdee4
      Unverified
      6d00236e
  16. Apr 09, 2020
    • James Kirsch's avatar
      Add support for encrypting backend Keystone HAProxy traffic · b475643c
      James Kirsch authored
      This patch introduces an optional backend encryption for Keystone
      service. When used in conjunction with enabling TLS for service API
      endpoints, network communcation will be encrypted end to end, from
      client through HAProxy to the Keystone service.
      
      Change-Id: I6351147ddaff8b2ae629179a9bc3bae2ebac9519
      Partially-Implements: blueprint add-ssl-internal-network
      b475643c
  17. Nov 05, 2019
  18. Oct 16, 2019
    • Radosław Piliszek's avatar
      Implement IPv6 support in the control plane · bc053c09
      Radosław Piliszek authored
      Introduce kolla_address filter.
      Introduce put_address_in_context filter.
      
      Add AF config to vars.
      
      Address contexts:
      - raw (default): <ADDR>
      - memcache: inet6:[<ADDR>]
      - url: [<ADDR>]
      
      Other changes:
      
      globals.yml - mention just IP in comment
      
      prechecks/port_checks (api_intf) - kolla_address handles validation
      
      3x interface conditional (swift configs: replication/storage)
      
      2x interface variable definition with hostname
      (haproxy listens; api intf)
      
      1x interface variable definition with hostname with bifrost exclusion
      (baremetal pre-install /etc/hosts; api intf)
      
      neutron's ml2 'overlay_ip_version' set to 6 for IPv6 on tunnel network
      
      basic multinode source CI job for IPv6
      
      prechecks for rabbitmq and qdrouterd use proper NSS database now
      
      MariaDB Galera Cluster WSREP SST mariabackup workaround
      (socat and IPv6)
      
      Ceph naming workaround in CI
      TODO: probably needs documenting
      
      RabbitMQ IPv6-only proto_dist
      
      Ceph ms switch to IPv6 mode
      
      Remove neutron-server ml2_type_vxlan/vxlan_group setting
      as it is not used (let's avoid any confusion)
      and could break setups without proper multicast routing
      if it started working (also IPv4-only)
      
      haproxy upgrade checks for slaves based on ipv6 addresses
      
      TODO:
      
      ovs-dpdk grabs ipv4 network address (w/ prefix len / submask)
      not supported, invalid by default because neutron_external has no address
      No idea whether ovs-dpdk works at all atm.
      
      ml2 for xenapi
      Xen is not supported too well.
      This would require working with XenAPI facts.
      
      rp_filter setting
      This would require meddling with ip6tables (there is no sysctl param).
      By default nothing is dropped.
      Unlikely we really need it.
      
      ironic dnsmasq is configured IPv4-only
      dnsmasq needs DHCPv6 options and testing in vivo.
      
      KNOWN ISSUES (beyond us):
      
      One cannot use IPv6 address to reference the image for docker like we
      currently do, see: https://github.com/moby/moby/issues/39033
      (docker_registry; docker API 400 - invalid reference format)
      workaround: use hostname/FQDN
      
      RabbitMQ may fail to bind to IPv6 if hostname resolves also to IPv4.
      This is due to old RabbitMQ versions available in images.
      IPv4 is preferred by default and may fail in the IPv6-only scenario.
      This should be no problem in real life as IPv6-only is indeed IPv6-only.
      Also, when new RabbitMQ (3.7.16/3.8+) makes it into images, this will
      no longer be relevant as we supply all the necessary config.
      See: https://github.com/rabbitmq/rabbitmq-server/pull/1982
      
      For reliable runs, at least Ansible 2.8 is required (2.8.5 confirmed
      to work well). Older Ansible versions are known to miss IPv6 addresses
      in interface facts. This may affect redeploys, reconfigures and
      upgrades which run after VIP address is assigned.
      See: https://github.com/ansible/ansible/issues/63227
      
      Bifrost Train does not support IPv6 deployments.
      See: https://storyboard.openstack.org/#!/story/2006689
      
      
      
      Change-Id: Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c
      Implements: blueprint ipv6-control-plane
      Signed-off-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
      bc053c09
  19. Aug 22, 2019
    • Krzysztof Klimonda's avatar
      Implement TLS encryption for internal endpoints · b0ecd8b6
      Krzysztof Klimonda authored
      This review is the first one in a series of patches and it introduces an
      optional encryption for internal openstack endpoints, implementing part
      of the add-ssl-internal-network spec.
      
      Change-Id: I6589751626486279bf24725f22e71da8cd7f0a43
      b0ecd8b6
  20. Dec 27, 2018
    • Jim Rollenhagen's avatar
      Allow separate listen port in haproxy-config templates · 3ea51cef
      Jim Rollenhagen authored
      This allows a service to pass in a different listening port than haproxy
      listens on for the service. This allows haproxy to live on the same
      network interface as the services, and will be used by services in
      subsequent changes.
      
      Change-Id: Id1d2429a4c800628cb43e0fb7d2b69131e71ee1c
      Implements: blueprint service-hostnames
      3ea51cef
  21. Oct 24, 2018
  22. Sep 26, 2018
    • Adam Harwell's avatar
      Refactor haproxy config (split by service) V2.0 · f1c81365
      Adam Harwell authored
      Having all services in one giant haproxy file makes altering
      configuration for a service both painful and dangerous. Each service
      should be configured with a simple set of variables and rendered with a
      single unified template.
      
      Available are two new templates:
      
      * haproxy_single_service_listen.cfg.j2: close to the original style, but
      only one service per file
      * haproxy_single_service_split.cfg.j2: using the newer haproxy syntax
      for separated frontend and backend
      
      For now the default will be the single listen block, for ease of
      transition.
      
      Change-Id: I6e237438fbc0aa3c89a3c8bd706a53b74e71904b
      f1c81365
Loading