Hey, I would highly discourage changing balancing algorithms for glance. It has been set to source IP by design, since requests to create image and upload image data in some cases may end up in different backends, which will result in image upload failure. Additionally, I'm really not sure there is a good way of doing so on Ussuri release :( From what I see there all haproxy backends are represented with only 1 variable: haproxy_default_services Since Victoria we have splitted this big variable into smaller service specific ones, which can be more or less nicely overriden. So starting from Victoria there is a variable haproxy_glance_api_service which can be used for configuring glance only: https://opendev.org/openstack/openstack-ansible/src/commit/08d90900f01ec25f6... Some more improvements came only in Antelope (2023.1), where the basic override method can be used to adjust only a specific value in such service variables. On Fri, Feb 9, 2024, 22:00 keshav bareja <keshav.bareja@gmail.com> wrote:
Hi All
I need to change haproxy configuration in the openstack-ussuri environment using openstack-ansible.
for glance-api service I need to change backend load-balancing algorithm from source to least-connect
I can see this configuration as part of group_vars of the source package* /opt/openstack-ansible <https://opendev.org/openstack/openstack-ansible/src/commit/6520d0bb2c689ed7caa5df581be6a966133cdce0>/inventory <https://opendev.org/openstack/openstack-ansible/src/commit/6520d0bb2c689ed7caa5df581be6a966133cdce0/inventory>/group_vars <https://opendev.org/openstack/openstack-ansible/src/commit/6520d0bb2c689ed7caa5df581be6a966133cdce0/inventory/group_vars>/haproxy <https://opendev.org/openstack/openstack-ansible/src/commit/6520d0bb2c689ed7caa5df581be6a966133cdce0/inventory/group_vars/haproxy>/haproxy.yml*
-service: haproxy_service_name: glance_api haproxy_backend_nodes: "{{ groups['glance_api'] | default([]) }}" haproxy_ssl: "{{ haproxy_ssl }}" haproxy_port: 9292 *haproxy_balance_alg: source* haproxy_balance_type: http haproxy_backend_options:
Can you please let me know how to do so?