Merge "Rename haproxy_hosts to load_balancer_hosts"
This commit is contained in:
commit
6816c68f68
@ -39,7 +39,7 @@ Ansible group mappings. These groups map to the physical
|
|||||||
hosts.
|
hosts.
|
||||||
|
|
||||||
The ``haproxy.yml.example`` file in the ``conf.d/`` directory provides
|
The ``haproxy.yml.example`` file in the ``conf.d/`` directory provides
|
||||||
a simple example of defining a host group (``haproxy_hosts``) with two hosts
|
a simple example of defining a host group (``load_balancer_hosts``) with two hosts
|
||||||
(``infra1`` and ``infra2``).
|
(``infra1`` and ``infra2``).
|
||||||
|
|
||||||
The ``swift.yml.example`` file provides a more complex example. Here, host
|
The ``swift.yml.example`` file provides a more complex example. Here, host
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
aio1:
|
aio1:
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# The nodes where haproxy will run
|
# The nodes where haproxy will run
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
infra1:
|
infra1:
|
||||||
ip: 172.20.236.110
|
ip: 172.20.236.110
|
||||||
infra2:
|
infra2:
|
||||||
|
@ -132,6 +132,6 @@ repo-infra_hosts:
|
|||||||
aio1:
|
aio1:
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
aio1:
|
aio1:
|
||||||
ip: 172.29.236.100
|
ip: 172.29.236.100
|
||||||
|
@ -805,7 +805,7 @@
|
|||||||
#
|
#
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
# Level: haproxy_hosts (optional)
|
# Level: load_balancer_hosts (optional)
|
||||||
# List of target hosts on which to deploy HAProxy. Recommend at least one
|
# List of target hosts on which to deploy HAProxy. Recommend at least one
|
||||||
# target host for this service if hardware load balancers are not being
|
# target host for this service if hardware load balancers are not being
|
||||||
# used.
|
# used.
|
||||||
@ -825,7 +825,7 @@
|
|||||||
# While HAProxy can be used as a virtual load balancer, it is recommended to use
|
# While HAProxy can be used as a virtual load balancer, it is recommended to use
|
||||||
# a physical load balancer in a production environment.
|
# a physical load balancer in a production environment.
|
||||||
#
|
#
|
||||||
# haproxy_hosts:
|
# load_balancer_hosts:
|
||||||
# lb1:
|
# lb1:
|
||||||
# ip: 172.29.236.100
|
# ip: 172.29.236.100
|
||||||
# lb2:
|
# lb2:
|
||||||
|
@ -111,7 +111,7 @@ repo-infra_hosts:
|
|||||||
# load balancer
|
# load balancer
|
||||||
# Ideally the load balancer should not use the Infrastructure hosts.
|
# Ideally the load balancer should not use the Infrastructure hosts.
|
||||||
# Dedicated hardware is best for improved performance and security.
|
# Dedicated hardware is best for improved performance and security.
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
infra1:
|
infra1:
|
||||||
ip: 172.29.236.11
|
ip: 172.29.236.11
|
||||||
infra2:
|
infra2:
|
||||||
|
@ -300,7 +300,7 @@ repo-infra_hosts: *controllers
|
|||||||
# load balancer
|
# load balancer
|
||||||
# Ideally the load balancer should not use the Infrastructure hosts.
|
# Ideally the load balancer should not use the Infrastructure hosts.
|
||||||
# Dedicated hardware is best for improved performance and security.
|
# Dedicated hardware is best for improved performance and security.
|
||||||
haproxy_hosts: *controllers
|
load_balancer_hosts: *controllers
|
||||||
|
|
||||||
###
|
###
|
||||||
### OpenStack
|
### OpenStack
|
||||||
|
@ -123,7 +123,7 @@ repo-infra_hosts: *infrastructure_hosts
|
|||||||
# load balancer
|
# load balancer
|
||||||
# Ideally the load balancer should not use the Infrastructure hosts.
|
# Ideally the load balancer should not use the Infrastructure hosts.
|
||||||
# Dedicated hardware is best for improved performance and security.
|
# Dedicated hardware is best for improved performance and security.
|
||||||
haproxy_hosts: *infrastructure_hosts
|
load_balancer_hosts: *infrastructure_hosts
|
||||||
|
|
||||||
###
|
###
|
||||||
### OpenStack
|
### OpenStack
|
||||||
|
@ -105,7 +105,7 @@ repo-infra_hosts:
|
|||||||
# load balancer
|
# load balancer
|
||||||
# Ideally the load balancer should not use the Infrastructure hosts.
|
# Ideally the load balancer should not use the Infrastructure hosts.
|
||||||
# Dedicated hardware is best for improved performance and security.
|
# Dedicated hardware is best for improved performance and security.
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
infra1:
|
infra1:
|
||||||
ip: 172.29.236.11
|
ip: 172.29.236.11
|
||||||
infra2:
|
infra2:
|
||||||
|
@ -149,7 +149,7 @@ repo-infra_hosts:
|
|||||||
# load balancer
|
# load balancer
|
||||||
# Ideally the load balancer should not use the Infrastructure hosts.
|
# Ideally the load balancer should not use the Infrastructure hosts.
|
||||||
# Dedicated hardware is best for improved performance and security.
|
# Dedicated hardware is best for improved performance and security.
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
infra1:
|
infra1:
|
||||||
ip: 172.29.236.11
|
ip: 172.29.236.11
|
||||||
infra2:
|
infra2:
|
||||||
|
@ -111,7 +111,7 @@ repo-infra_hosts:
|
|||||||
# load balancer
|
# load balancer
|
||||||
# Ideally the load balancer should not use the Infrastructure hosts.
|
# Ideally the load balancer should not use the Infrastructure hosts.
|
||||||
# Dedicated hardware is best for improved performance and security.
|
# Dedicated hardware is best for improved performance and security.
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
infra1:
|
infra1:
|
||||||
ip: 172.29.236.11
|
ip: 172.29.236.11
|
||||||
infra2:
|
infra2:
|
||||||
|
@ -82,7 +82,7 @@ repo-infra_hosts:
|
|||||||
ip: 172.29.236.11
|
ip: 172.29.236.11
|
||||||
|
|
||||||
# load balancer
|
# load balancer
|
||||||
haproxy_hosts:
|
load_balancer_hosts:
|
||||||
infra1:
|
infra1:
|
||||||
ip: 172.29.236.11
|
ip: 172.29.236.11
|
||||||
|
|
||||||
|
@ -23,12 +23,19 @@ container_skel:
|
|||||||
haproxy_container:
|
haproxy_container:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
- haproxy_containers
|
- haproxy_containers
|
||||||
|
- load_balancer_containers
|
||||||
contains:
|
contains:
|
||||||
- haproxy
|
- haproxy
|
||||||
properties:
|
properties:
|
||||||
is_metal: true
|
is_metal: true
|
||||||
|
|
||||||
physical_skel:
|
physical_skel:
|
||||||
|
load_balancer_containers:
|
||||||
|
belongs_to:
|
||||||
|
- all_containers
|
||||||
|
load_balancer_hosts:
|
||||||
|
belongs_to:
|
||||||
|
- hosts
|
||||||
haproxy_containers:
|
haproxy_containers:
|
||||||
belongs_to:
|
belongs_to:
|
||||||
- all_containers
|
- all_containers
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Group name for HAProxy destination hosts in `openstack_user_config.yml``
|
||||||
|
was renamed from ``haproxy_hosts`` to ``load_balancer_hosts``.
|
||||||
|
While backwards compatability is kept, it is recommended to replace
|
||||||
|
defenition with the new group during the upgrade.
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
Usage of ``haproxy_hosts`` in `openstack_user_config.yml`` has been
|
||||||
|
deprecated in favor of ``load_balancer_hosts``.
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
``haproxy_all`` group is no longer populated with bare metal hosts in
|
||||||
|
case of installing haproxy/keepalived inside LXC containers.
|
@ -233,6 +233,9 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase):
|
|||||||
'haproxy_container',
|
'haproxy_container',
|
||||||
'haproxy_containers',
|
'haproxy_containers',
|
||||||
'haproxy_hosts',
|
'haproxy_hosts',
|
||||||
|
'load_balancer_containers',
|
||||||
|
'load_balancer_hosts',
|
||||||
|
'load_balancer_all',
|
||||||
'heat_all',
|
'heat_all',
|
||||||
'heat_api',
|
'heat_api',
|
||||||
'heat_api_cfn',
|
'heat_api_cfn',
|
||||||
@ -789,7 +792,7 @@ class TestConfigChecks(TestConfigCheckBase):
|
|||||||
self.assertEqual(context.exception.new_host, 'host2')
|
self.assertEqual(context.exception.new_host, 'host2')
|
||||||
|
|
||||||
def test_two_hosts_same_ip_externally(self):
|
def test_two_hosts_same_ip_externally(self):
|
||||||
self.set_new_hostname(self.user_defined_config, "haproxy_hosts",
|
self.set_new_hostname(self.user_defined_config, "load_balancer_hosts",
|
||||||
"aio1", "hap")
|
"aio1", "hap")
|
||||||
with self.assertRaises(di.MultipleHostsWithOneIPError) as context:
|
with self.assertRaises(di.MultipleHostsWithOneIPError) as context:
|
||||||
get_inventory()
|
get_inventory()
|
||||||
@ -801,7 +804,7 @@ class TestConfigChecks(TestConfigCheckBase):
|
|||||||
def test_one_host_two_ips_externally(self):
|
def test_one_host_two_ips_externally(self):
|
||||||
# haproxy chosen because it was last in the config file as of
|
# haproxy chosen because it was last in the config file as of
|
||||||
# writing
|
# writing
|
||||||
self.set_new_ip(self.user_defined_config, 'haproxy_hosts', 'aio1',
|
self.set_new_ip(self.user_defined_config, 'load_balancer_hosts', 'aio1',
|
||||||
'172.29.236.101')
|
'172.29.236.101')
|
||||||
with self.assertRaises(di.MultipleIpForHostError) as context:
|
with self.assertRaises(di.MultipleIpForHostError) as context:
|
||||||
get_inventory()
|
get_inventory()
|
||||||
|
Loading…
Reference in New Issue
Block a user