Merge "Remove baremetal to containerized pacemaker upgrade_tasks."
This commit is contained in:
commit
979b641157
@ -278,14 +278,6 @@ outputs:
|
||||
- name: Get docker Cinder-Backup image
|
||||
set_fact:
|
||||
cinder_backup_docker_image_latest: *cinder_backup_image_pcmklatest
|
||||
- name: Check for Cinder-Backup Kolla configuration
|
||||
command: grep '^backup_driver[ \t]*=' /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf
|
||||
changed_when: no
|
||||
ignore_errors: true
|
||||
register: cinder_backup_kolla_config
|
||||
- name: Check if Cinder-Backup is already containerized
|
||||
set_fact:
|
||||
cinder_backup_containerized: "{{cinder_backup_kolla_config|succeeded}}"
|
||||
- name: Prepare the switch to new cinder_backup container image name in pacemaker
|
||||
when: cinder_backup_containerized|bool
|
||||
block:
|
||||
@ -313,42 +305,9 @@ outputs:
|
||||
- name: set is_cinder_backup_bootstrap_node fact
|
||||
tags: common
|
||||
set_fact: is_cinder_backup_bootstrap_node={{cinder_backup_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Cinder-Backup baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not cinder_backup_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-backup
|
||||
state: show
|
||||
check_mode: false
|
||||
ignore_errors: true
|
||||
register: cinder_backup_res
|
||||
- when: (is_cinder_backup_bootstrap_node) and (cinder_backup_res|succeeded)
|
||||
block:
|
||||
- name: Disable the openstack-cinder-backup cluster resource
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-backup
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped openstack-cinder-backup cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-backup
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable cinder_backup service
|
||||
service: name=openstack-cinder-backup enabled=no
|
||||
- name: Update cinder_backup pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- cinder_backup_containerized|bool
|
||||
- is_cinder_backup_bootstrap_node
|
||||
- cinder_backup_pcs_res|bool
|
||||
block:
|
||||
@ -373,7 +332,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- cinder_backup_containerized|bool
|
||||
block: *cinder_backup_fetch_retag_container_tasks
|
||||
fast_forward_upgrade_tasks:
|
||||
- when:
|
||||
|
@ -263,16 +263,7 @@ outputs:
|
||||
- name: Get docker Cinder-Volume image
|
||||
set_fact:
|
||||
cinder_volume_docker_image_latest: *cinder_volume_image_pcmklatest
|
||||
- name: Check for Cinder-Volume Kolla configuration
|
||||
command: grep '^volume_driver[ \t]*=' /var/lib/config-data/puppet-generated/cinder/etc/cinder/cinder.conf
|
||||
changed_when: no
|
||||
ignore_errors: true
|
||||
register: cinder_volume_kolla_config
|
||||
- name: Check if Cinder-Volume is already containerized
|
||||
set_fact:
|
||||
cinder_volume_containerized: "{{cinder_volume_kolla_config|succeeded}}"
|
||||
- name: Prepare the switch to new cinder_volume container image name in pacemaker
|
||||
when: cinder_volume_containerized|bool
|
||||
block:
|
||||
- name: Get cinder_volume image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/cinder-volume.* pcmklatest/{print $3}' | uniq"
|
||||
@ -298,48 +289,9 @@ outputs:
|
||||
- name: set is_cinder_volume_bootstrap_node fact
|
||||
tags: common
|
||||
set_fact: is_cinder_volume_bootstrap_node={{cinder_volume_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Stop cinder_volume service (pacemaker)
|
||||
when: step|int == 1
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-volume
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
- name: Cinder-Volume baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not cinder_volume_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-volume
|
||||
state: show
|
||||
check_mode: false
|
||||
ignore_errors: true
|
||||
register: cinder_volume_res
|
||||
- when: (is_cinder_volume_bootstrap_node) and (cinder_volume_res|succeeded)
|
||||
block:
|
||||
- name: Disable the openstack-cinder-volume cluster resource
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-volume
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped openstack-cinder-volume cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: openstack-cinder-volume
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable cinder_volume service from boot
|
||||
service: name=openstack-cinder-volume enabled=no
|
||||
- name: Update cinder_volume pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- cinder_volume_containerized|bool
|
||||
- is_cinder_volume_bootstrap_node
|
||||
- cinder_volume_pcs_res|bool
|
||||
block:
|
||||
@ -365,7 +317,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- cinder_volume_containerized|bool
|
||||
block: *cinder_volume_fetch_retag_container_tasks
|
||||
post_upgrade_tasks:
|
||||
- name: Start cinder_volume service (pacemaker)
|
||||
|
@ -414,17 +414,9 @@ outputs:
|
||||
- name: Get docker Mysql image
|
||||
set_fact:
|
||||
mysql_docker_image_latest: *mysql_image_pcmklatest
|
||||
- name: Check for Mysql Kolla configuration
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/mysql
|
||||
register: mysql_kolla_config
|
||||
- name: Check if Mysql is already containerized
|
||||
set_fact:
|
||||
mysql_containerized: "{{mysql_kolla_config.stat.isdir | default(false)}}"
|
||||
- name: set is_mysql_bootstrap_node fact
|
||||
set_fact: is_mysql_bootstrap_node={{mysql_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Prepare the switch to new galera container image name in pacemaker
|
||||
when: mysql_containerized|bool
|
||||
block:
|
||||
- name: Get galera image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/mariadb.* pcmklatest/{print $3}' | uniq"
|
||||
@ -447,46 +439,9 @@ outputs:
|
||||
- name: Set fact galera_pcs_res
|
||||
set_fact:
|
||||
galera_pcs_res: "{{galera_pcs_res_result|succeeded}}"
|
||||
- name: Mysql baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not mysql_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status
|
||||
pacemaker_resource:
|
||||
resource: galera
|
||||
state: master
|
||||
check_mode: true
|
||||
ignore_errors: true
|
||||
register: galera_res
|
||||
- when: (is_mysql_bootstrap_node) and (galera_res|succeeded)
|
||||
block:
|
||||
- name: Disable the galera cluster resource
|
||||
pacemaker_resource:
|
||||
resource: galera
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped galera cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: galera
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable mysql service
|
||||
service: name=mariadb enabled=no
|
||||
- name: Remove clustercheck service from xinetd
|
||||
file: state=absent path=/etc/xinetd.d/galera-monitor
|
||||
- name: Restart xinetd service after clustercheck removal
|
||||
service: name=xinetd state=restarted
|
||||
- name: Update galera pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- mysql_containerized|bool
|
||||
- is_mysql_bootstrap_node
|
||||
- galera_pcs_res|bool
|
||||
block:
|
||||
@ -525,7 +480,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- mysql_containerized|bool
|
||||
block: *mysql_fetch_retag_container_tasks
|
||||
- name: Check and upgrade Mysql database after major version upgrade
|
||||
when: step|int == 3
|
||||
@ -544,7 +498,7 @@ outputs:
|
||||
# executed for the current version of MariaDB.
|
||||
list_join:
|
||||
- ' '
|
||||
- - '{% if mysql_containerized %}kolla_set_configs; {% endif %}'
|
||||
- - 'kolla_set_configs;'
|
||||
- 'chown -R mysql:mysql /var/lib/mysql;'
|
||||
- 'mysqld_safe --user=mysql --wsrep-provider=none --skip-networking --wsrep-on=off &'
|
||||
- 'timeout 60 sh -c ''while ! mysqladmin ping --silent; do sleep 1; done'';'
|
||||
@ -564,10 +518,6 @@ outputs:
|
||||
UPGRADE_VOLUMES: "-v {{ mysql_upgrade_db_bind_mounts | union(['/tmp/mariadb-upgrade:/var/log/mariadb:rw']) | join(' -v ')}}"
|
||||
UPGRADE_SCRIPT: "{{mysql_upgrade_script}}"
|
||||
CONTAINER_CLI: "{{ container_cli }}"
|
||||
when: mysql_containerized|bool
|
||||
- name: Upgrade Mysql database from the host
|
||||
shell: /bin/bash -ecx "{{mysql_upgrade_script}}"
|
||||
when: not mysql_containerized|bool
|
||||
external_upgrade_tasks:
|
||||
- vars:
|
||||
mysql_upgrade_transfer: {get_param: MysqlUpgradeTransfer}
|
||||
|
@ -354,17 +354,9 @@ outputs:
|
||||
- name: Get docker redis image
|
||||
set_fact:
|
||||
redis_docker_image_latest: *redis_image_pcmklatest
|
||||
- name: Check for redis Kolla configuration
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/redis
|
||||
register: redis_kolla_config
|
||||
- name: Check if redis is already containerized
|
||||
set_fact:
|
||||
redis_containerized: "{{redis_kolla_config.stat.isdir | default(false)}}"
|
||||
- name: set is_redis_bootstrap_node fact
|
||||
set_fact: is_redis_bootstrap_node={{redis_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Prepare the switch to new redis container image name in pacemaker
|
||||
when: redis_containerized|bool
|
||||
block:
|
||||
- name: Get redis image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/redis.* pcmklatest/{print $3}' | uniq"
|
||||
@ -387,42 +379,9 @@ outputs:
|
||||
- name: Set fact redis_pcs_res
|
||||
set_fact:
|
||||
redis_pcs_res: "{{redis_pcs_res_result|succeeded}}"
|
||||
- name: redis baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not redis_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status of redis
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RedisBase, role_data, service_name]}
|
||||
state: show
|
||||
check_mode: false
|
||||
ignore_errors: true
|
||||
register: redis_res
|
||||
- when: (is_redis_bootstrap_node) and (redis_res|succeeded)
|
||||
block:
|
||||
- name: Disable the redis cluster resource
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RedisBase, role_data, service_name]}
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped redis cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RedisBase, role_data, service_name]}
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable redis service
|
||||
service: name=redis enabled=no
|
||||
- name: Update redis-bundle pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- redis_containerized|bool
|
||||
- is_redis_bootstrap_node
|
||||
- redis_pcs_res|bool
|
||||
block:
|
||||
@ -461,7 +420,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- redis_containerized|bool
|
||||
block: *redis_fetch_retag_container_tasks
|
||||
fast_forward_upgrade_tasks:
|
||||
- when:
|
||||
|
@ -358,20 +358,12 @@ outputs:
|
||||
update_tasks:
|
||||
- name: Set HAProxy upgrade facts
|
||||
block: &haproxy_update_upgrade_facts
|
||||
- name: Check for haproxy Kolla configuration
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/haproxy
|
||||
register: haproxy_kolla_config
|
||||
- name: Check if haproxy is already containerized
|
||||
set_fact:
|
||||
haproxy_containerized: "{{haproxy_kolla_config.stat.isdir | default(false)}}"
|
||||
- name: set is_haproxy_bootstrap_node fact
|
||||
tags: common
|
||||
set_fact: is_haproxy_bootstrap_node={{haproxy_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Mount TLS cert if needed
|
||||
when:
|
||||
- step|int == 1
|
||||
- haproxy_containerized|bool
|
||||
- is_haproxy_bootstrap_node
|
||||
block:
|
||||
- name: Check haproxy public certificate configuration in pacemaker
|
||||
@ -446,7 +438,6 @@ outputs:
|
||||
- name: Set HAProxy upgrade facts
|
||||
block: *haproxy_update_upgrade_facts
|
||||
- name: Prepare the switch to new haproxy container image name in pacemaker
|
||||
when: haproxy_containerized|bool
|
||||
block:
|
||||
- name: Get haproxy image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/haproxy.* pcmklatest/{print $3}' | uniq"
|
||||
@ -469,40 +460,9 @@ outputs:
|
||||
- name: Set fact haproxy_pcs_res
|
||||
set_fact:
|
||||
haproxy_pcs_res: "{{haproxy_pcs_res_result|succeeded}}"
|
||||
- name: haproxy baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not haproxy_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status
|
||||
pacemaker_resource:
|
||||
resource: haproxy
|
||||
state: started
|
||||
check_mode: true
|
||||
ignore_errors: true
|
||||
register: haproxy_res
|
||||
- when: (is_haproxy_bootstrap_node) and (haproxy_res|succeeded)
|
||||
block:
|
||||
- name: Disable the haproxy cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: haproxy
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped haproxy cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: haproxy
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Update haproxy pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- haproxy_containerized|bool
|
||||
- is_haproxy_bootstrap_node
|
||||
- haproxy_pcs_res|bool
|
||||
block:
|
||||
@ -550,5 +510,4 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- haproxy_containerized|bool
|
||||
block: *haproxy_fetch_retag_container_tasks
|
||||
|
@ -264,16 +264,7 @@ outputs:
|
||||
- name: Get docker Manila-Share image
|
||||
set_fact:
|
||||
manila_share_docker_image_latest: *manila_share_image_pcmklatest
|
||||
- name: Check for Manila-Share Kolla configuration
|
||||
command: grep '^share_driver[ \t]*=' /var/lib/config-data/puppet-generated/manila/etc/manila/manila.conf
|
||||
changed_when: no
|
||||
ignore_errors: true
|
||||
register: manila_share_kolla_config
|
||||
- name: Check if Manila-Share is already containerized
|
||||
set_fact:
|
||||
manila_share_containerized: "{{manila_share_kolla_config|succeeded}}"
|
||||
- name: Prepare the switch to new Manila-Share container image name in pacemaker
|
||||
when: manila_share_containerized|bool
|
||||
block:
|
||||
- name: Get Manila-Share image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/manila-share.* pcmklatest/{print $3}' | uniq"
|
||||
@ -299,42 +290,9 @@ outputs:
|
||||
- name: set is_manila_share_bootstrap_node fact
|
||||
tags: common
|
||||
set_fact: is_manila_share_bootstrap_node={{manila_share_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Manila-Share baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not manila_share_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status
|
||||
pacemaker_resource:
|
||||
resource: openstack-manila-share
|
||||
state: show
|
||||
check_mode: false
|
||||
ignore_errors: true
|
||||
register: manila_share_res
|
||||
- when: (is_manila_share_bootstrap_node) and (manila_share_res|succeeded)
|
||||
block:
|
||||
- name: Disable the openstack-manila-share cluster resource
|
||||
pacemaker_resource:
|
||||
resource: openstack-manila-share
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped openstack-manila-share cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: openstack-manila-share
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable manila_share service from boot
|
||||
service: name=openstack-manila-share enabled=no
|
||||
- name: Update openstack-manila-share pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- manila_share_containerized|bool
|
||||
- is_manila_share_bootstrap_node
|
||||
- manila_share_pcs_res|bool
|
||||
block:
|
||||
@ -360,7 +318,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- manila_share_containerized|bool
|
||||
block: *manila_share_fetch_retag_container_tasks
|
||||
fast_forward_upgrade_tasks:
|
||||
- name: Check cluster resource status
|
||||
|
@ -210,19 +210,11 @@ outputs:
|
||||
set_fact:
|
||||
ovn_dbs_docker_image: {get_param: DockerOvnDbsImage}
|
||||
ovn_dbs_docker_image_latest: *ovn_dbs_image_pcmklatest
|
||||
- name: Check for ovn-dbs log file
|
||||
stat:
|
||||
path: /var/log/containers/openvswitch/ovsdb-server-nb.log
|
||||
register: ovn_dbs_log_file
|
||||
- name: Check if ovn-dbs is already containerized
|
||||
set_fact:
|
||||
ovn_dbs_containerized: "{{ovn_dbs_log_file.stat.exists | default(false)}}"
|
||||
- name: set is_ovn_dbs_bootstrap_node fact
|
||||
set_fact: is_ovn_dbs_bootstrap_node={{ovn_dbs_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: ovn-dbs fetch and retag container image for pacemaker
|
||||
when:
|
||||
- step|int == 3
|
||||
- ovn_dbs_containerized|bool
|
||||
block: &ovn_dbs_fetch_retag_container_tasks
|
||||
- name: Get previous ovn-dbs image id
|
||||
shell: "{{container_cli}} images | awk '/ovn.* pcmklatest/{print $3}' | uniq"
|
||||
@ -257,7 +249,6 @@ outputs:
|
||||
- name: Update ovn-dbs-bundle resource to use pcmklatest tag image if not used
|
||||
when:
|
||||
- step|int == 5
|
||||
- ovn_dbs_containerized|bool
|
||||
- is_ovn_dbs_bootstrap_node
|
||||
block:
|
||||
- name: Get the present image used by ovn-dbs-bundle
|
||||
@ -273,13 +264,6 @@ outputs:
|
||||
when: step|int == 1
|
||||
service: name=ovn-northd state=stopped enabled=no
|
||||
ignore_errors: true
|
||||
- name: Check for ovn-dbs log file
|
||||
stat:
|
||||
path: /var/log/containers/openvswitch/ovsdb-server-nb.log
|
||||
register: ovn_dbs_log_file
|
||||
- name: Check if ovn-dbs is already containerized
|
||||
set_fact:
|
||||
ovn_dbs_containerized: "{{ovn_dbs_log_file.stat.exists | default(false)}}"
|
||||
- name: Get docker ovn-dbs image
|
||||
set_fact:
|
||||
ovn_dbs_docker_image: {get_param: DockerOvnDbsImage}
|
||||
@ -289,7 +273,6 @@ outputs:
|
||||
- name: Prepare the switch to new ovn-dbs container image name in pacemaker
|
||||
when:
|
||||
- step|int == 0
|
||||
- ovn_dbs_containerized|bool
|
||||
block:
|
||||
- name: Get ovn-dbs image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/ovn.* pcmklatest/{print $3}' | uniq"
|
||||
@ -329,12 +312,10 @@ outputs:
|
||||
- name: Update ovn-bundle pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- ovn_dbs_containerized|bool
|
||||
- is_ovn_dbs_bootstrap_node
|
||||
- ovndbs_pcs_res|succeeded
|
||||
block: *ovn_dbs_update_bundle_with_new_image
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- ovn_dbs_containerized|bool
|
||||
block: *ovn_dbs_fetch_retag_container_tasks
|
||||
|
@ -313,51 +313,11 @@ outputs:
|
||||
- name: Get docker Rabbitmq image
|
||||
set_fact:
|
||||
docker_image_latest: *rabbitmq_image_pcmklatest
|
||||
- name: Check for Rabbitmq Kolla configuration
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/rabbitmq
|
||||
register: rabbit_kolla_config
|
||||
- name: Check if Rabbitmq is already containerized
|
||||
set_fact:
|
||||
rabbit_containerized: "{{rabbit_kolla_config.stat.isdir | default(false)}}"
|
||||
- name: set is_notify_rabbitmq_bootstrap_node fact
|
||||
set_fact: is_notify_rabbitmq_bootstrap_node={{oslo_messaging_notify_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Rabbitmq baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not rabbit_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status of rabbitmq
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
check_mode: false
|
||||
state: show
|
||||
ignore_errors: true
|
||||
register: rabbitmq_res
|
||||
- when: (is_notify_rabbitmq_bootstrap_node) and (rabbitmq_res|succeeded)
|
||||
block:
|
||||
- name: Disable the rabbitmq cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped rabbitmq cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable rabbitmq service
|
||||
service: name=rabbitmq-server enabled=no
|
||||
- name: Move rabbitmq logging to /var/log/containers
|
||||
when:
|
||||
- step|int == 1
|
||||
- rabbit_containerized|bool
|
||||
- is_notify_rabbitmq_bootstrap_node
|
||||
block:
|
||||
- name: Check rabbitmq logging configuration in pacemaker
|
||||
@ -389,7 +349,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- rabbit_containerized|bool
|
||||
block: *rabbitmq_fetch_retag_container_tasks
|
||||
fast_forward_upgrade_tasks:
|
||||
- when:
|
||||
|
@ -309,51 +309,11 @@ outputs:
|
||||
- name: Get docker Rabbitmq image
|
||||
set_fact:
|
||||
rabbitmq_docker_image_latest: *rabbitmq_image_pcmklatest
|
||||
- name: Check for Rabbitmq Kolla configuration
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/rabbitmq
|
||||
register: rabbit_kolla_config
|
||||
- name: Check if Rabbitmq is already containerized
|
||||
set_fact:
|
||||
rabbit_containerized: "{{rabbit_kolla_config.stat.isdir | default(false)}}"
|
||||
- name: set is_rabbitmq_bootstrap_node fact
|
||||
set_fact: is_rabbitmq_bootstrap_node={{rabbitmq_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Rabbitmq baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not rabbit_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status of rabbitmq
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
check_mode: false
|
||||
state: show
|
||||
ignore_errors: true
|
||||
register: rabbitmq_res
|
||||
- when: (is_rabbitmq_bootstrap_node) and (rabbitmq_res|succeeded)
|
||||
block:
|
||||
- name: Disable the rabbitmq cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped rabbitmq cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable rabbitmq service
|
||||
service: name=rabbitmq-server enabled=no
|
||||
- name: Prepare the switch to new rabbitmq container image name in pacemaker
|
||||
when:
|
||||
- step|int == 0
|
||||
- rabbit_containerized|bool
|
||||
block:
|
||||
- name: Get rabbitmq image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/rabbitmq.* pcmklatest/{print $3}' | uniq"
|
||||
@ -376,7 +336,6 @@ outputs:
|
||||
- name: Update rabbitmq-bundle pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- rabbit_containerized|bool
|
||||
- is_rabbitmq_bootstrap_node
|
||||
- rabbit_pcs_res|succeeded
|
||||
block:
|
||||
@ -411,7 +370,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- rabbit_containerized|bool
|
||||
block: *rabbitmq_fetch_retag_container_tasks
|
||||
fast_forward_upgrade_tasks:
|
||||
- when:
|
||||
|
@ -309,51 +309,11 @@ outputs:
|
||||
- name: Get docker Rabbitmq image
|
||||
set_fact:
|
||||
rabbitmq_docker_image_latest: *rabbitmq_image_pcmklatest
|
||||
- name: Check for Rabbitmq Kolla configuration
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/rabbitmq
|
||||
register: rabbit_kolla_config
|
||||
- name: Check if Rabbitmq is already containerized
|
||||
set_fact:
|
||||
rabbit_containerized: "{{rabbit_kolla_config.stat.isdir | default(false)}}"
|
||||
- name: set is_rpc_rabbitmq_bootstrap_node fact
|
||||
set_fact: is_rpc_rabbitmq_bootstrap_node={{oslo_messaging_rpc_short_bootstrap_node_name|lower == ansible_hostname|lower}}
|
||||
- name: Rabbitmq baremetal to container upgrade tasks
|
||||
when:
|
||||
- step|int == 1
|
||||
- not rabbit_containerized|bool
|
||||
block:
|
||||
- name: Check cluster resource status of rabbitmq
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
check_mode: false
|
||||
state: show
|
||||
ignore_errors: true
|
||||
register: rabbitmq_res
|
||||
- when: (is_rpc_rabbitmq_bootstrap_node) and (rabbitmq_res|succeeded)
|
||||
block:
|
||||
- name: Disable the rabbitmq cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
state: disable
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Delete the stopped rabbitmq cluster resource.
|
||||
pacemaker_resource:
|
||||
resource: {get_attr: [RabbitmqBase, role_data, service_name]}
|
||||
state: delete
|
||||
wait_for_resource: true
|
||||
register: output
|
||||
retries: 5
|
||||
until: output.rc == 0
|
||||
- name: Disable rabbitmq service
|
||||
service: name=rabbitmq-server enabled=no
|
||||
- name: Prepare the switch to new rabbitmq container image name in pacemaker
|
||||
when:
|
||||
- step|int == 0
|
||||
- rabbit_containerized|bool
|
||||
block:
|
||||
- name: Get rabbitmq image id currently used by pacemaker
|
||||
shell: "{{container_cli}} images | awk '/rabbitmq.* pcmklatest/{print $3}' | uniq"
|
||||
@ -376,7 +336,6 @@ outputs:
|
||||
- name: Update rabbitmq-bundle pcs resource bundle for new container image
|
||||
when:
|
||||
- step|int == 1
|
||||
- rabbit_containerized|bool
|
||||
- is_rpc_rabbitmq_bootstrap_node
|
||||
- rabbit_pcs_res|succeeded
|
||||
block:
|
||||
@ -411,7 +370,6 @@ outputs:
|
||||
- name: Retag the pacemaker image if containerized
|
||||
when:
|
||||
- step|int == 3
|
||||
- rabbit_containerized|bool
|
||||
block: *rabbitmq_fetch_retag_container_tasks
|
||||
fast_forward_upgrade_tasks:
|
||||
- when:
|
||||
|
Loading…
Reference in New Issue
Block a user