diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 8041b72f01..1edbd69fe2 100644 --- a/common/deploy-steps.j2 +++ b/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}} diff --git a/docker/services/cinder-api.yaml b/docker/services/cinder-api.yaml index a9bd63d4e1..ffc69ded46 100644 --- a/docker/services/cinder-api.yaml +++ b/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: diff --git a/docker/services/database/mysql.yaml b/docker/services/database/mysql.yaml index 22886b05c2..6f6fbfbe6d 100644 --- a/docker/services/database/mysql.yaml +++ b/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: diff --git a/docker/services/ironic-api.yaml b/docker/services/ironic-api.yaml index 373cc4e00b..8cda37ffa1 100644 --- a/docker/services/ironic-api.yaml +++ b/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: diff --git a/docker/services/nova-api.yaml b/docker/services/nova-api.yaml index 79341c01c7..bf9fd8d52a 100644 --- a/docker/services/nova-api.yaml +++ b/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: diff --git a/puppet/services/haproxy-public-tls-inject.yaml b/puppet/services/haproxy-public-tls-inject.yaml index 5cd9fb2a31..80d76e1f20 100644 --- a/puppet/services/haproxy-public-tls-inject.yaml +++ b/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