Make sure the resource bundles use a location_rule
In composable HA we bind resources to nodes that have special node properties. We need to do this also for bundle resources otherwise there is a potential race where the bundle might be started on nodes where it is not supposed to during a small window of time. Tested with the depends-on and correctly obtained a containerized composable HA deployment: Docker container set: rabbitmq-bundle [192.168.24.1:8787/tripleoupstream/centos-binary-rabbitmq:latest] rabbitmq-bundle-0 (ocf:💓rabbitmq-cluster): Started overcloud-rabbit-0 rabbitmq-bundle-1 (ocf:💓rabbitmq-cluster): Started overcloud-rabbit-1 rabbitmq-bundle-2 (ocf:💓rabbitmq-cluster): Started overcloud-rabbit-2 Docker container set: galera-bundle [192.168.24.1:8787/tripleoupstream/centos-binary-mariadb:latest] galera-bundle-0 (ocf:💓galera): Master overcloud-galera-0 galera-bundle-1 (ocf:💓galera): Master overcloud-galera-1 galera-bundle-2 (ocf:💓galera): Master overcloud-galera-2 Docker container set: redis-bundle [192.168.24.1:8787/tripleoupstream/centos-binary-redis:latest] redis-bundle-0 (ocf:💓redis): Master overcloud-controller-0 redis-bundle-1 (ocf:💓redis): Slave overcloud-controller-1 redis-bundle-2 (ocf:💓redis): Slave overcloud-controller-2 ip-192.168.24.11 (ocf:💓IPaddr2): Started overcloud-controller-0 ip-10.0.0.7 (ocf:💓IPaddr2): Started overcloud-controller-1 ip-172.16.2.11 (ocf:💓IPaddr2): Started overcloud-controller-2 ip-172.16.2.9 (ocf:💓IPaddr2): Started overcloud-controller-0 ip-172.16.1.6 (ocf:💓IPaddr2): Started overcloud-controller-1 ip-172.16.3.7 (ocf:💓IPaddr2): Started overcloud-controller-2 Docker container set: haproxy-bundle [192.168.24.1:8787/tripleoupstream/centos-binary-haproxy:latest] haproxy-bundle-docker-0 (ocf:💓docker): Started overcloud-controller-0 haproxy-bundle-docker-1 (ocf:💓docker): Started overcloud-controller-1 haproxy-bundle-docker-2 (ocf:💓docker): Started overcloud-controller-2 Depends-On: I44449861cbfe56304b8829c9ca10fd648353b3ae Change-Id: I48fb490040497ba08cae19937159c0efdf99e3f8
This commit is contained in:
parent
782ffcba1e
commit
b10adec303
|
@ -199,6 +199,11 @@ MYSQL_HOST=localhost\n",
|
|||
image => $mysql_docker_image,
|
||||
replicas => $galera_nodes_count,
|
||||
masters => $galera_nodes_count,
|
||||
location_rule => {
|
||||
resource_discovery => 'exclusive',
|
||||
score => 0,
|
||||
expression => ['galera-role eq true'],
|
||||
},
|
||||
container_options => 'network=host',
|
||||
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
|
||||
run_command => '/bin/bash /usr/local/bin/kolla_start',
|
||||
|
|
|
@ -73,6 +73,11 @@ class tripleo::profile::pacemaker::database::redis_bundle (
|
|||
image => $redis_docker_image,
|
||||
replicas => $redis_nodes_count,
|
||||
masters => 1,
|
||||
location_rule => {
|
||||
resource_discovery => 'exclusive',
|
||||
score => 0,
|
||||
expression => ['redis-role eq true'],
|
||||
},
|
||||
container_options => 'network=host',
|
||||
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
|
||||
run_command => '/bin/bash /usr/local/bin/kolla_start',
|
||||
|
|
|
@ -87,6 +87,7 @@ class tripleo::profile::pacemaker::haproxy_bundle (
|
|||
pacemaker::resource::bundle { 'haproxy-bundle':
|
||||
image => $haproxy_docker_image,
|
||||
replicas => $haproxy_nodes_count,
|
||||
location_rule => $haproxy_location_rule,
|
||||
container_options => 'network=host',
|
||||
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
|
||||
run_command => '/bin/bash /usr/local/bin/kolla_start',
|
||||
|
|
|
@ -105,6 +105,11 @@ class tripleo::profile::pacemaker::rabbitmq_bundle (
|
|||
pacemaker::resource::bundle { 'rabbitmq-bundle':
|
||||
image => $rabbitmq_docker_image,
|
||||
replicas => $rabbitmq_nodes_count,
|
||||
location_rule => {
|
||||
resource_discovery => 'exclusive',
|
||||
score => 0,
|
||||
expression => ['rabbitmq-role eq true'],
|
||||
},
|
||||
container_options => 'network=host',
|
||||
options => '--user=root --log-driver=journald -e KOLLA_CONFIG_STRATEGY=COPY_ALWAYS',
|
||||
run_command => '/bin/bash /usr/local/bin/kolla_start',
|
||||
|
|
Loading…
Reference in New Issue