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