aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/services/ceph-ansible/ceph-base.yaml31
-rw-r--r--docker/services/ceph-ansible/ceph-client.yaml2
-rw-r--r--docker/services/ceph-ansible/ceph-external.yaml2
-rw-r--r--docker/services/ceph-ansible/ceph-mds.yaml2
-rw-r--r--docker/services/ceph-ansible/ceph-mon.yaml2
-rw-r--r--docker/services/ceph-ansible/ceph-osd.yaml4
-rw-r--r--docker/services/ceph-ansible/ceph-rgw.yaml2
-rw-r--r--docker/services/containers-common.yaml1
-rw-r--r--docker/services/gnocchi-metricd.yaml2
-rw-r--r--docker/services/gnocchi-statsd.yaml2
-rw-r--r--docker/services/haproxy.yaml5
-rw-r--r--docker/services/nova-api.yaml2
-rw-r--r--docker/services/pacemaker/cinder-backup.yaml6
-rw-r--r--docker/services/pacemaker/cinder-volume.yaml6
-rw-r--r--docker/services/pacemaker/database/mysql.yaml24
-rw-r--r--docker/services/pacemaker/database/redis.yaml111
-rw-r--r--docker/services/pacemaker/haproxy.yaml23
-rw-r--r--docker/services/pacemaker/rabbitmq.yaml18
18 files changed, 182 insertions, 63 deletions
diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml
index 18d3e6a3..8cc81fb0 100644
--- a/docker/services/ceph-ansible/ceph-base.yaml
+++ b/docker/services/ceph-ansible/ceph-base.yaml
@@ -58,13 +58,17 @@ parameters:
type: string
description: List of ceph-ansible tags to skip
default: 'package-install,with_pkg'
+ CephConfigOverrides:
+ type: json
+ description: Extra config settings to dump into ceph.conf
+ default: {}
CephClusterFSID:
type: string
description: The Ceph cluster FSID. Must be a UUID.
CephPoolDefaultPgNum:
description: default pg_num to use for the RBD pools
type: number
- default: 32
+ default: 128
CephPools:
description: >
It can be used to override settings for one of the predefined pools, or to create
@@ -178,7 +182,7 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks:
+ workflow_tasks:
step2:
- name: ceph_base_ansible_workflow
workflow: { get_param: CephAnsibleWorkflowName }
@@ -269,16 +273,19 @@ outputs:
pools: []
ceph_conf_overrides:
global:
- osd_pool_default_size: {get_param: CephPoolDefaultSize}
- osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
- rgw_keystone_api_version: 3
- rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
- rgw_keystone_accepted_roles: 'Member, _member_, admin'
- rgw_keystone_admin_domain: default
- rgw_keystone_admin_project: service
- rgw_keystone_admin_user: swift
- rgw_keystone_admin_password: {get_param: SwiftPassword}
- rgw_s3_auth_use_keystone: 'true'
+ map_merge:
+ - osd_pool_default_size: {get_param: CephPoolDefaultSize}
+ osd_pool_default_pg_num: {get_param: CephPoolDefaultPgNum}
+ osd_pool_default_pgp_num: {get_param: CephPoolDefaultPgNum}
+ rgw_keystone_api_version: 3
+ rgw_keystone_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]}
+ rgw_keystone_accepted_roles: 'Member, _member_, admin'
+ rgw_keystone_admin_domain: default
+ rgw_keystone_admin_project: service
+ rgw_keystone_admin_user: swift
+ rgw_keystone_admin_password: {get_param: SwiftPassword}
+ rgw_s3_auth_use_keystone: 'true'
+ - {get_param: CephConfigOverrides}
ntp_service_enabled: false
generate_fsid: false
ip_version:
diff --git a/docker/services/ceph-ansible/ceph-client.yaml b/docker/services/ceph-ansible/ceph-client.yaml
index 55d8d9da..0b782941 100644
--- a/docker/services/ceph-ansible/ceph-client.yaml
+++ b/docker/services/ceph-ansible/ceph-client.yaml
@@ -54,5 +54,5 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks: {get_attr: [CephBase, role_data, service_workflow_tasks]}
+ workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]}
config_settings: {}
diff --git a/docker/services/ceph-ansible/ceph-external.yaml b/docker/services/ceph-ansible/ceph-external.yaml
index f93dd566..bb2fc20a 100644
--- a/docker/services/ceph-ansible/ceph-external.yaml
+++ b/docker/services/ceph-ansible/ceph-external.yaml
@@ -58,7 +58,7 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks: {get_attr: [CephBase, role_data, service_workflow_tasks]}
+ workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]}
config_settings:
ceph_client_ansible_vars:
map_merge:
diff --git a/docker/services/ceph-ansible/ceph-mds.yaml b/docker/services/ceph-ansible/ceph-mds.yaml
index 4ef3a669..abdb3c3f 100644
--- a/docker/services/ceph-ansible/ceph-mds.yaml
+++ b/docker/services/ceph-ansible/ceph-mds.yaml
@@ -68,7 +68,7 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks: {get_attr: [CephBase, role_data, service_workflow_tasks]}
+ workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]}
config_settings:
map_merge:
- tripleo.ceph_mds.firewall_rules:
diff --git a/docker/services/ceph-ansible/ceph-mon.yaml b/docker/services/ceph-ansible/ceph-mon.yaml
index 90149d1e..45f939c2 100644
--- a/docker/services/ceph-ansible/ceph-mon.yaml
+++ b/docker/services/ceph-ansible/ceph-mon.yaml
@@ -71,7 +71,7 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks: {get_attr: [CephBase, role_data, service_workflow_tasks]}
+ workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]}
config_settings:
map_merge:
- tripleo.ceph_mon.firewall_rules:
diff --git a/docker/services/ceph-ansible/ceph-osd.yaml b/docker/services/ceph-ansible/ceph-osd.yaml
index 6e0f4a60..a441f5c9 100644
--- a/docker/services/ceph-ansible/ceph-osd.yaml
+++ b/docker/services/ceph-ansible/ceph-osd.yaml
@@ -38,6 +38,7 @@ parameters:
- /dev/vdb
journal_size: 512
journal_collocation: true
+ osd_scenario: collocated
resources:
CephBase:
@@ -62,7 +63,7 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks: {get_attr: [CephBase, role_data, service_workflow_tasks]}
+ workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]}
config_settings:
map_merge:
- tripleo.ceph_osd.firewall_rules:
@@ -72,4 +73,5 @@ outputs:
- ceph_osd_ansible_vars:
map_merge:
- {get_attr: [CephBase, role_data, config_settings, ceph_common_ansible_vars]}
+ - osd_objectstore: filestore
- {get_param: CephAnsibleDisksConfig} \ No newline at end of file
diff --git a/docker/services/ceph-ansible/ceph-rgw.yaml b/docker/services/ceph-ansible/ceph-rgw.yaml
index 4bed9b46..4479fdbf 100644
--- a/docker/services/ceph-ansible/ceph-rgw.yaml
+++ b/docker/services/ceph-ansible/ceph-rgw.yaml
@@ -62,7 +62,7 @@ outputs:
config_volume: ''
step_config: ''
docker_config: {}
- service_workflow_tasks: {get_attr: [CephBase, role_data, service_workflow_tasks]}
+ workflow_tasks: {get_attr: [CephBase, role_data, workflow_tasks]}
config_settings:
map_merge:
- tripleo.ceph_rgw.firewall_rules:
diff --git a/docker/services/containers-common.yaml b/docker/services/containers-common.yaml
index 2c894da5..9f982f8b 100644
--- a/docker/services/containers-common.yaml
+++ b/docker/services/containers-common.yaml
@@ -64,6 +64,7 @@ outputs:
# Syslog socket
- /dev/log:/dev/log
- /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts:ro
+ - /sys/fs/selinux:/sys/fs/selinux
- if:
- internal_tls_enabled
- - list_join:
diff --git a/docker/services/gnocchi-metricd.yaml b/docker/services/gnocchi-metricd.yaml
index 5a6958a0..9a114458 100644
--- a/docker/services/gnocchi-metricd.yaml
+++ b/docker/services/gnocchi-metricd.yaml
@@ -90,7 +90,7 @@ outputs:
owner: gnocchi:gnocchi
recurse: true
docker_config:
- step_4:
+ step_5:
gnocchi_metricd:
image: {get_param: DockerGnocchiMetricdImage}
net: host
diff --git a/docker/services/gnocchi-statsd.yaml b/docker/services/gnocchi-statsd.yaml
index 2957312b..834d0055 100644
--- a/docker/services/gnocchi-statsd.yaml
+++ b/docker/services/gnocchi-statsd.yaml
@@ -90,7 +90,7 @@ outputs:
owner: gnocchi:gnocchi
recurse: true
docker_config:
- step_4:
+ step_5:
gnocchi_statsd:
image: {get_param: DockerGnocchiStatsdImage}
net: host
diff --git a/docker/services/haproxy.yaml b/docker/services/haproxy.yaml
index f0e2f71d..70e1f893 100644
--- a/docker/services/haproxy.yaml
+++ b/docker/services/haproxy.yaml
@@ -96,8 +96,7 @@ outputs:
config_settings:
map_merge:
- get_attr: [HAProxyBase, role_data, config_settings]
- - tripleo::haproxy::haproxy_daemon: false
- tripleo::haproxy::haproxy_service_manage: false
+ - tripleo::haproxy::haproxy_service_manage: false
# NOTE(jaosorior): We disable the CRL since we have no way to restart haproxy
# when this is updated
tripleo::haproxy::crl_file: null
@@ -130,7 +129,7 @@ outputs:
- null
kolla_config:
/var/lib/kolla/config_files/haproxy.json:
- command: haproxy -f /etc/haproxy/haproxy.cfg
+ command: /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml
index f46e27c0..9f1ae865 100644
--- a/docker/services/nova-api.yaml
+++ b/docker/services/nova-api.yaml
@@ -219,7 +219,7 @@ outputs:
detach: false
volumes: *nova_api_bootstrap_volumes
user: root
- command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 discover_hosts'"
+ command: "/usr/bin/bootstrap_host_exec nova_api su nova -s /bin/bash -c '/usr/bin/nova-manage cell_v2 discover_hosts --verbose'"
metadata_settings:
get_attr: [NovaApiBase, role_data, metadata_settings]
host_prep_tasks:
diff --git a/docker/services/pacemaker/cinder-backup.yaml b/docker/services/pacemaker/cinder-backup.yaml
index c2117c04..cdb8c1bc 100644
--- a/docker/services/pacemaker/cinder-backup.yaml
+++ b/docker/services/pacemaker/cinder-backup.yaml
@@ -188,6 +188,9 @@ outputs:
resource: openstack-cinder-backup
state: disable
wait_for_resource: true
+ register: output
+ retries: 5
+ until: output.rc == 0
when: is_bootstrap_node
- name: Delete the stopped openstack-cinder-backup cluster resource.
tags: step2
@@ -195,6 +198,9 @@ outputs:
resource: openstack-cinder-backup
state: delete
wait_for_resource: true
+ register: output
+ retries: 5
+ until: output.rc == 0
when: is_bootstrap_node
- name: Disable cinder_backup service
tags: step2
diff --git a/docker/services/pacemaker/cinder-volume.yaml b/docker/services/pacemaker/cinder-volume.yaml
index a4f69517..15c5e099 100644
--- a/docker/services/pacemaker/cinder-volume.yaml
+++ b/docker/services/pacemaker/cinder-volume.yaml
@@ -206,6 +206,9 @@ outputs:
resource: openstack-cinder-volume
state: disable
wait_for_resource: true
+ register: output
+ retries: 5
+ until: output.rc == 0
when: is_bootstrap_node
- name: Delete the stopped openstack-cinder-volume cluster resource.
tags: step2
@@ -213,6 +216,9 @@ outputs:
resource: openstack-cinder-volume
state: delete
wait_for_resource: true
+ register: output
+ retries: 5
+ until: output.rc == 0
when: is_bootstrap_node
- name: Disable cinder_volume service from boot
tags: step2
diff --git a/docker/services/pacemaker/database/mysql.yaml b/docker/services/pacemaker/database/mysql.yaml
index f57f779e..9dace271 100644
--- a/docker/services/pacemaker/database/mysql.yaml
+++ b/docker/services/pacemaker/database/mysql.yaml
@@ -159,6 +159,7 @@ outputs:
detach: false
image: {get_param: DockerMysqlImage}
net: host
+ user: root
# Kolla bootstraps aren't idempotent, explicitly checking if bootstrap was done
command:
- 'bash'
@@ -167,8 +168,9 @@ outputs:
list_join:
- "\n"
- - 'if [ -e /var/lib/mysql/mysql ]; then exit 0; fi'
- - 'kolla_start'
- - 'mysqld_safe --skip-networking --wsrep-on=OFF --wsrep-provider=none &'
+ - 'echo -e "\n[mysqld]\nwsrep_provider=none" >> /etc/my.cnf'
+ - 'sudo -u mysql -E kolla_start'
+ - 'mysqld_safe --skip-networking --wsrep-on=OFF &'
- 'timeout ${DB_MAX_TIMEOUT} /bin/bash -c ''until mysqladmin -uroot -p"${DB_ROOT_PASSWORD}" ping 2>/dev/null; do sleep 1; done'''
- 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "CREATE USER ''clustercheck''@''localhost'' IDENTIFIED BY ''${DB_CLUSTERCHECK_PASSWORD}'';"'
- 'mysql -uroot -p"${DB_ROOT_PASSWORD}" -e "GRANT PROCESS ON *.* TO ''clustercheck''@''localhost'' WITH GRANT OPTION;"'
@@ -266,20 +268,34 @@ outputs:
- name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
+ - name: Check cluster resource status
+ tags: step2
+ pacemaker_resource:
+ resource: galera
+ state: master
+ check_mode: true
+ ignore_errors: true
+ register: galera_res
- name: Disable the galera cluster resource
tags: step2
pacemaker_resource:
resource: galera
state: disable
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and galera_res|succeeded
- name: Delete the stopped galera cluster resource.
tags: step2
pacemaker_resource:
resource: galera
state: delete
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and galera_res|succeeded
- name: Disable mysql service
tags: step2
service: name=mariadb enabled=no
diff --git a/docker/services/pacemaker/database/redis.yaml b/docker/services/pacemaker/database/redis.yaml
index 0b8aa046..4d26a084 100644
--- a/docker/services/pacemaker/database/redis.yaml
+++ b/docker/services/pacemaker/database/redis.yaml
@@ -36,9 +36,19 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
+ EnableInternalTLS:
+ type: boolean
+ default: false
+
+conditions:
+
+ internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
resources:
+ ContainersCommon:
+ type: ../../containers-common.yaml
+
RedisBase:
type: ../../../../puppet/services/database/redis.yaml
properties:
@@ -74,6 +84,8 @@ outputs:
- 3124
- 6379
- 26379
+ tripleo::stunnel::manage_service: false
+ tripleo::stunnel::foreground: 'yes'
step_config: ""
service_config_settings: {get_attr: [RedisBase, role_data, service_config_settings]}
# BEGIN DOCKER SETTINGS
@@ -109,6 +121,13 @@ outputs:
- path: /var/log/redis
owner: redis:redis
recurse: true
+ /var/lib/kolla/config_files/redis_tls_proxy.json:
+ command: stunnel /etc/stunnel/stunnel.conf
+ config_files:
+ - source: "/var/lib/kolla/config_files/src/*"
+ dest: "/"
+ merge: true
+ preserve_properties: true
docker_config:
step_1:
redis_image_tag:
@@ -134,32 +153,54 @@ outputs:
- /usr/bin:/usr/bin:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
step_2:
- redis_init_bundle:
- start_order: 2
- detach: false
- net: host
- user: root
- config_volume: 'redis_init_bundle'
- command:
- - '/bin/bash'
- - '-c'
- - str_replace:
- template:
- list_join:
- - '; '
- - - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
- - "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
- params:
- TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
- CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::database::redis_bundle'
- image: *redis_config_image
- volumes:
- - /etc/hosts:/etc/hosts:ro
- - /etc/localtime:/etc/localtime:ro
- - /etc/puppet:/tmp/puppet-etc:ro
- - /usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro
- - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
- - /dev/shm:/dev/shm:rw
+ map_merge:
+ - redis_init_bundle:
+ start_order: 2
+ detach: false
+ net: host
+ user: root
+ config_volume: 'redis_init_bundle'
+ command:
+ - '/bin/bash'
+ - '-c'
+ - str_replace:
+ template:
+ list_join:
+ - '; '
+ - - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
+ - "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
+ params:
+ TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
+ CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::database::redis_bundle'
+ image: *redis_config_image
+ volumes:
+ - /etc/hosts:/etc/hosts:ro
+ - /etc/localtime:/etc/localtime:ro
+ - /etc/puppet:/tmp/puppet-etc:ro
+ - /usr/share/openstack-puppet/modules:/usr/share/openstack-puppet/modules:ro
+ - /etc/corosync/corosync.conf:/etc/corosync/corosync.conf:ro
+ - /dev/shm:/dev/shm:rw
+ - if:
+ - internal_tls_enabled
+ - redis_tls_proxy:
+ start_order: 3
+ image: *redis_image_pcmklatest
+ net: host
+ user: root
+ restart: always
+ volumes:
+ list_concat:
+ - {get_attr: [ContainersCommon, volumes]}
+ -
+ - /var/lib/kolla/config_files/redis_tls_proxy.json:/var/lib/kolla/config_files/config.json:ro
+ - /var/lib/config-data/puppet-generated/redis/:/var/lib/kolla/config_files/src:ro
+ - /etc/pki/tls/certs/redis.crt:/etc/pki/tls/certs/redis.crt:ro
+ - /etc/pki/tls/private/redis.key:/etc/pki/tls/private/redis.key:ro
+ environment:
+ - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ - {}
+ metadata_settings:
+ get_attr: [RedisBase, role_data, metadata_settings]
host_prep_tasks:
- name: create /var/run/redis
file:
@@ -181,20 +222,34 @@ outputs:
- name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
+ - name: Check cluster resource status
+ tags: step2
+ pacemaker_resource:
+ resource: {get_attr: [RedisBase, role_data, service_name]}
+ state: master
+ check_mode: true
+ ignore_errors: true
+ register: redis_res
- name: Disable the redis cluster resource
tags: step2
pacemaker_resource:
resource: {get_attr: [RedisBase, role_data, service_name]}
state: disable
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and redis_res|succeeded
- name: Delete the stopped redis cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [RedisBase, role_data, service_name]}
state: delete
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and redis_res|succeeded
- name: Disable redis service
tags: step2
service: name=redis enabled=no
diff --git a/docker/services/pacemaker/haproxy.yaml b/docker/services/pacemaker/haproxy.yaml
index 3cdc5255..2cc04e96 100644
--- a/docker/services/pacemaker/haproxy.yaml
+++ b/docker/services/pacemaker/haproxy.yaml
@@ -78,8 +78,7 @@ outputs:
config_settings:
map_merge:
- get_attr: [HAProxyBase, role_data, config_settings]
- - tripleo::haproxy::haproxy_daemon: false
- haproxy_docker: true
+ - haproxy_docker: true
tripleo::profile::pacemaker::haproxy_bundle::haproxy_docker_image: &haproxy_image {get_param: DockerHAProxyImage}
# the list of directories that contain the certs to bind mount in the countainer
# bind-mounting the directories rather than all the cert, key and pem files ensures
@@ -120,7 +119,7 @@ outputs:
data: *tls_mapping
kolla_config:
/var/lib/kolla/config_files/haproxy.json:
- command: haproxy -f /etc/haproxy/haproxy.cfg
+ command: /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
@@ -224,17 +223,31 @@ outputs:
- name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
+ - name: Check cluster resource status
+ tags: step2
+ pacemaker_resource:
+ resource: {get_attr: [HAProxyBase, role_data, service_name]}
+ state: started
+ check_mode: true
+ ignore_errors: true
+ register: haproxy_res
- name: Disable the haproxy cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [HAProxyBase, role_data, service_name]}
state: disable
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and haproxy_res|succeeded
- name: Delete the stopped haproxy cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [HAProxyBase, role_data, service_name]}
state: delete
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and haproxy_res|succeeded
diff --git a/docker/services/pacemaker/rabbitmq.yaml b/docker/services/pacemaker/rabbitmq.yaml
index ba1abaf9..7333689c 100644
--- a/docker/services/pacemaker/rabbitmq.yaml
+++ b/docker/services/pacemaker/rabbitmq.yaml
@@ -215,20 +215,34 @@ outputs:
- name: set is_bootstrap_node fact
tags: common
set_fact: is_bootstrap_node={{bootstrap_node.stdout|lower == ansible_hostname|lower}}
+ - name: Check cluster resource status
+ tags: step2
+ pacemaker_resource:
+ resource: {get_attr: [RabbitmqBase, role_data, service_name]}
+ state: started
+ check_mode: true
+ ignore_errors: true
+ register: rabbitmq_res
- name: Disable the rabbitmq cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: disable
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and rabbitmq_res|succeeded
- name: Delete the stopped rabbitmq cluster resource.
tags: step2
pacemaker_resource:
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
state: delete
wait_for_resource: true
- when: is_bootstrap_node
+ register: output
+ retries: 5
+ until: output.rc == 0
+ when: is_bootstrap_node and rabbitmq_res|succeeded
- name: Disable rabbitmq service
tags: step2
service: name=rabbitmq-server enabled=no