Browse Source

Merge "Use container_cli for post_upgrade_tasks & external_upgrade_tasks"

changes/93/599593/15
Zuul 4 years ago committed by Gerrit Code Review
parent
commit
6cd75e791b
  1. 5
      common/deploy-steps.j2
  2. 4
      docker/services/cinder-api.yaml
  3. 2
      docker/services/database/mysql.yaml
  4. 4
      docker/services/ironic-api.yaml
  5. 4
      docker/services/nova-api.yaml
  6. 4
      puppet/services/haproxy-public-tls-inject.yaml

5
common/deploy-steps.j2

@ -816,6 +816,7 @@ outputs:
params:
DEPLOY_SOURCE_HOST: {get_param: deployment_source_hosts}
DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts}
CONTAINER_CLI: {get_param: ContainerCli}
template: |
- hosts: DEPLOY_SOURCE_HOST
name: Gather facts from undercloud
@ -843,6 +844,8 @@ outputs:
gather_facts: no
any_errors_fatal: yes
become: false
vars:
container_cli: CONTAINER_CLI
tasks:
- include: external_upgrade_steps_tasks.yaml
with_sequence: start=0 end={{external_upgrade_steps_max-1}}
@ -859,6 +862,8 @@ outputs:
gather_facts: no
any_errors_fatal: yes
become: false
vars:
container_cli: CONTAINER_CLI
tasks:
- include: external_deploy_steps_tasks.yaml
with_sequence: start=1 end={{deploy_steps_max-1}}

4
docker/services/cinder-api.yaml

@ -261,7 +261,7 @@ outputs:
when: cinder_api_enabled|bool
tags: validation
- name: Ensure all online data migrations for Cinder have been applied
command: docker exec cinder_api cinder-manage db online_data_migrations
command: "{{ container_cli }} exec cinder_api cinder-manage db online_data_migrations"
tags: pre-upgrade
when:
- is_bootstrap_node|bool
@ -292,7 +292,7 @@ outputs:
- when: step|int == 1
block:
- name: Online data migration for Cinder
command: docker exec cinder_api cinder-manage db online_data_migrations
command: "{{ container_cli }} exec cinder_api cinder-manage db online_data_migrations"
delegate_to: "{{ groups['cinder_api'][0] }}"
become: true
tags:

2
docker/services/database/mysql.yaml

@ -290,7 +290,7 @@ outputs:
service: name=mariadb state=stopped enabled=no
post_upgrade_tasks:
- name: Check and upgrade Mysql database after major version upgrade
command: docker exec -u root mysql mysql_upgrade
command: "{{ container_cli }} exec -u root mysql mysql_upgrade"
when: step|int == 2
fast_forward_upgrade_tasks:
- when:

4
docker/services/ironic-api.yaml

@ -197,7 +197,7 @@ outputs:
- ironic_httpd_enabled|bool
- httpd_running|bool
- name: Ensure all online data migrations for Ironic have been applied
command: docker exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
command: "{{ container_cli }} exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations"
tags: pre-upgrade
when:
- is_bootstrap_node|bool
@ -227,7 +227,7 @@ outputs:
- when: step|int == 1
block:
- name: Online data migration for Ironic
command: docker exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
command: "{{ container_cli }} exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations"
delegate_to: "{{ groups['ironic_api'][0] }}"
become: true
tags:

4
docker/services/nova-api.yaml

@ -363,7 +363,7 @@ outputs:
- nova_api_httpd_enabled|bool
- httpd_running|bool
- name: Ensure all online data migrations for Nova have been applied
command: docker exec nova_api nova-manage db online_data_migrations
command: "{{ container_cli }} exec nova_api nova-manage db online_data_migrations"
tags: pre-upgrade
when:
- is_bootstrap_node|bool
@ -398,7 +398,7 @@ outputs:
- when: step|int == 1
block:
- name: Online data migration for Nova
command: docker exec nova_api nova-manage db online_data_migrations
command: "{{ container_cli }} exec nova_api nova-manage db online_data_migrations"
delegate_to: "{{ groups['nova_api'][0] }}"
become: true
tags:

4
puppet/services/haproxy-public-tls-inject.yaml

@ -186,11 +186,11 @@ outputs:
register: kolla_cert_exists
- name: set certificate group on host via container
command: docker exec {{container_id.stdout}} chgrp haproxy {{kolla_dir}}{{cert_path}}
command: "{{ container_cli }} exec {{container_id.stdout}} chgrp haproxy {{kolla_dir}}{{cert_path}}"
when: kolla_cert_exists.stat.exists
- name: copy certificate from kolla directory to final location
command: docker exec {{container_id.stdout}} cp {{kolla_dir}}{{cert_path}} {{cert_path}}
command: "{{ container_cli }} exec {{container_id.stdout}} cp {{kolla_dir}}{{cert_path}} {{cert_path}}"
when: kolla_cert_exists.stat.exists
- name: send restart order to haproxy container

Loading…
Cancel
Save