Add pipefail to each command that piped with timestamp
When pipe is added to command, it should still exit with its result code, so save it by setting pipeline option before each command. Close-Bug: #1676156 Change-Id: Ibbe49b4a15a5b7825447a563fe35af85fd48b3ff
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
- name: Provision script execution
|
- name: Provision script execution
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ baremetal_provisioning_script }} 2>&1 {{ timestamper_cmd }} >
|
{{ baremetal_provisioning_script }} 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ baremetal_provisioning_log }}
|
{{ baremetal_provisioning_log }}
|
||||||
when: step_provide_undercloud
|
when: step_provide_undercloud
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
- name: run the image build script (direct)
|
- name: run the image build script (direct)
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ images_working_dir }}/overcloud_image_build_script.sh 2>&1 {{ timestamper_cmd }} >
|
{{ images_working_dir }}/overcloud_image_build_script.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ working_dir }}/{{ overcloud_image_build_log }}
|
{{ working_dir }}/{{ overcloud_image_build_log }}
|
||||||
args:
|
args:
|
||||||
|
@@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
- name: Build docs with Sphinx
|
- name: Build docs with Sphinx
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
sphinx-build -b html "{{ artcl_docs_source_dir }}" "{{ artcl_docs_build_dir }}"
|
sphinx-build -b html "{{ artcl_docs_source_dir }}" "{{ artcl_docs_build_dir }}"
|
||||||
2>&1 {{ timestamper_cmd }} > {{ artcl_collect_dir }}/docs/sphinx_build.log
|
2>&1 {{ timestamper_cmd }} > {{ artcl_collect_dir }}/docs/sphinx_build.log
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
- name: Setup repos on live host
|
- name: Setup repos on live host
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ ib_repo_workdir }}/install-built-repo.sh 2>&1 {{ timestamper_cmd }} >
|
{{ ib_repo_workdir }}/install-built-repo.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ ib_repo_install_log }}
|
{{ ib_repo_install_log }}
|
||||||
become: true
|
become: true
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
block:
|
block:
|
||||||
- name: Delete the overcloud
|
- name: Delete the overcloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-delete.sh 2>&1 {{ timestamper_cmd }} > {{ delete_log }}
|
{{ working_dir }}/overcloud-delete.sh 2>&1 {{ timestamper_cmd }} > {{ delete_log }}
|
||||||
tags:
|
tags:
|
||||||
- overcloud-delete
|
- overcloud-delete
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
- name: Deploy the overcloud
|
- name: Deploy the overcloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-deploy.sh 2>&1 {{ timestamper_cmd }} > {{ deploy_log }}
|
{{ working_dir }}/overcloud-deploy.sh 2>&1 {{ timestamper_cmd }} > {{ deploy_log }}
|
||||||
register: deploy_script_result
|
register: deploy_script_result
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
- name: Run the deployed-server_prepare script
|
- name: Run the deployed-server_prepare script
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/deployed_server_prepare.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/deployed_server_prepare.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ deployed_server_prepare_log }}
|
{{ deployed_server_prepare_log }}
|
||||||
async: 10800
|
async: 10800
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
- name: Run post-deploy script
|
- name: Run post-deploy script
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-deploy-post.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-deploy-post.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ post_deploy_log }}
|
{{ post_deploy_log }}
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
|
|
||||||
- name: Modify the nic-configs file to use Linux bonds
|
- name: Modify the nic-configs file to use Linux bonds
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/bond-with-vlans-copy-nic-configs.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/bond-with-vlans-copy-nic-configs.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ bond_with_vlans_nic_configs_log }}
|
{{ bond_with_vlans_nic_configs_log }}
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@
|
|||||||
|
|
||||||
- name: Checkout custom tht heat templates from src
|
- name: Checkout custom tht heat templates from src
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-custom-tht-script.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-custom-tht-script.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ overcloud_custom_tht_log }}
|
{{ overcloud_custom_tht_log }}
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Prepare for the containerized deployment
|
- name: Prepare for the containerized deployment
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-prep-containers.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-prep-containers.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ overcloud_prep_containers_log }}
|
{{ overcloud_prep_containers_log }}
|
||||||
when: containerized_overcloud|bool
|
when: containerized_overcloud|bool
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
- name: Prepare the scripts for overcloud flavors
|
- name: Prepare the scripts for overcloud flavors
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-prep-flavors.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-prep-flavors.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ overcloud_prep_flavors_log }}
|
{{ overcloud_prep_flavors_log }}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
- name: Prepare the overcloud images for deploy
|
- name: Prepare the overcloud images for deploy
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-prep-images.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-prep-images.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ overcloud_prep_images_log }}
|
{{ overcloud_prep_images_log }}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
- name: Prepare the network-isolation required networks on the undercloud
|
- name: Prepare the network-isolation required networks on the undercloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-prep-network.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-prep-network.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ overcloud_prep_network_log }}
|
{{ overcloud_prep_network_log }}
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
- name: Delete node by id
|
- name: Delete node by id
|
||||||
shell: >
|
shell: >
|
||||||
cat {{ working_dir }}/delete-node.sh;
|
cat {{ working_dir }}/delete-node.sh;
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/delete-node.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/delete-node.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
delete_node_scale_console.log;
|
delete_node_scale_console.log;
|
||||||
|
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
- name: Call scale deployment script
|
- name: Call scale deployment script
|
||||||
shell: >
|
shell: >
|
||||||
source {{ working_dir }}/stackrc;
|
source {{ working_dir }}/stackrc;
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/scale-deployment.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/scale-deployment.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
overcloud_deployment_scale_console.log;
|
overcloud_deployment_scale_console.log;
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
- name: Generate SSL certificates
|
- name: Generate SSL certificates
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-create-ssl-cert.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/overcloud-create-ssl-cert.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ overcloud_ssl_cert_log }}
|
{{ overcloud_ssl_cert_log }}
|
||||||
|
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
- name: Execute upgrade repo script
|
- name: Execute upgrade repo script
|
||||||
become: yes
|
become: yes
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ upgrade_working_dir }}/upgrade-undercloud-repo.sh 2>&1 {{ timestamper_cmd }} >
|
{{ upgrade_working_dir }}/upgrade-undercloud-repo.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
upgrade-undercloud-repo.sh.log
|
upgrade-undercloud-repo.sh.log
|
||||||
when: step_pre_undercloud_upgrade
|
when: step_pre_undercloud_upgrade
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Upgrade the overcloud
|
- name: Upgrade the overcloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ upgrade_working_dir }}/overcloud-upgrade.sh 2>&1 {{ timestamper_cmd }} >
|
{{ upgrade_working_dir }}/overcloud-upgrade.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ upgrade_log }}
|
{{ upgrade_log }}
|
||||||
when: step_upgrade_overcloud
|
when: step_upgrade_overcloud
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Upgrade the undercloud
|
- name: Upgrade the undercloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ upgrade_working_dir }}/undercloud-upgrade.sh 2>&1 {{ timestamper_cmd }} >
|
{{ upgrade_working_dir }}/undercloud-upgrade.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ undercloud_upgrade_log }}
|
{{ undercloud_upgrade_log }}
|
||||||
when: step_upgrade_undercloud
|
when: step_upgrade_undercloud
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
- name: Setup repos on live host
|
- name: Setup repos on live host
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ repo_setup_dir }}/repo_setup.sh 2>&1 {{ timestamper_cmd }} >
|
{{ repo_setup_dir }}/repo_setup.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ repo_setup_log }}
|
{{ repo_setup_log }}
|
||||||
become: true
|
become: true
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
- name: Install the undercloud
|
- name: Install the undercloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/undercloud-install.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/undercloud-install.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ undercloud_install_log }}
|
{{ undercloud_install_log }}
|
||||||
when: step_install_undercloud
|
when: step_install_undercloud
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
- name: Run the novajoin installation script
|
- name: Run the novajoin installation script
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/install_novajoin.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/install_novajoin.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ working_dir }}/install_novajoin.sh.log
|
{{ working_dir }}/install_novajoin.sh.log
|
||||||
|
|
||||||
@@ -34,6 +35,7 @@
|
|||||||
|
|
||||||
- name: Run the novajoin preparation script
|
- name: Run the novajoin preparation script
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/novajoin_prep.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/novajoin_prep.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ working_dir }}/novajoin_prep.sh.log
|
{{ working_dir }}/novajoin_prep.sh.log
|
||||||
|
|
||||||
|
@@ -8,5 +8,6 @@
|
|||||||
|
|
||||||
- name: Run the package installation script
|
- name: Run the package installation script
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/install_packages.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/install_packages.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ working_dir }}/install_packages.sh.log
|
{{ working_dir }}/install_packages.sh.log
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
- name: Run the TripleO-CI VXLAN networking script on subnodes
|
- name: Run the TripleO-CI VXLAN networking script on subnodes
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
timeout --preserve-status 60s {{ working_dir }}/toci_vxlan_networking_multinode.sh
|
timeout --preserve-status 60s {{ working_dir }}/toci_vxlan_networking_multinode.sh
|
||||||
2>&1 {{ timestamper_cmd }} > {{ working_dir }}/toci_vxlan_networking_multinode.sh.log
|
2>&1 {{ timestamper_cmd }} > {{ working_dir }}/toci_vxlan_networking_multinode.sh.log
|
||||||
when: toci_vxlan_networking_multinode|bool
|
when: toci_vxlan_networking_multinode|bool
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
|
|
||||||
- name: Run the TripleO-CI VXLAN networking script
|
- name: Run the TripleO-CI VXLAN networking script
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/toci_vxlan_networking.sh
|
{{ working_dir }}/toci_vxlan_networking.sh
|
||||||
2>&1 {{ timestamper_cmd }} > {{ working_dir }}/toci_vxlan_networking.sh.log
|
2>&1 {{ timestamper_cmd }} > {{ working_dir }}/toci_vxlan_networking.sh.log
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Run sanity checks
|
- name: Run sanity checks
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/validate-sanity-check.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/validate-sanity-check.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ sanity_checks_log }}
|
{{ sanity_checks_log }}
|
||||||
|
@@ -30,4 +30,5 @@
|
|||||||
|
|
||||||
- name: Validate the overcloud
|
- name: Validate the overcloud
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/overcloud-validate.sh 2>&1 {{ timestamper_cmd }} > {{ validate_log }}
|
{{ working_dir }}/overcloud-validate.sh 2>&1 {{ timestamper_cmd }} > {{ validate_log }}
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Execute tempest
|
- name: Execute tempest
|
||||||
shell: |
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/tempest-setup.sh 2>&1 {{ timestamper_cmd }} > {{ tempest_log_file }}
|
{{ working_dir }}/tempest-setup.sh 2>&1 {{ timestamper_cmd }} > {{ tempest_log_file }}
|
||||||
register: tempest_result
|
register: tempest_result
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
- name: Reinstall the undercloud to check idempotency
|
- name: Reinstall the undercloud to check idempotency
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/undercloud-install.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/undercloud-install.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ undercloud_reinstall_log }}
|
{{ undercloud_reinstall_log }}
|
||||||
when: undercloud_check_idempotency|bool
|
when: undercloud_check_idempotency|bool
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
|
|
||||||
- name: check undercloud sanity
|
- name: check undercloud sanity
|
||||||
shell: >
|
shell: >
|
||||||
|
set -o pipefail &&
|
||||||
{{ working_dir }}/undercloud-sanity-check.sh 2>&1 {{ timestamper_cmd }} >
|
{{ working_dir }}/undercloud-sanity-check.sh 2>&1 {{ timestamper_cmd }} >
|
||||||
{{ undercloud_sanity_check_log }}
|
{{ undercloud_sanity_check_log }}
|
||||||
when: undercloud_check_sanity|bool
|
when: undercloud_check_sanity|bool
|
||||||
|
Reference in New Issue
Block a user