CI: exit codes and results of shell tasks are ignored in quickstart

Bug #1676156 reported by Sagi (Sergey) Shnaidman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Sagi (Sergey) Shnaidman

Bug Description

After we enabled adding timestamps in log files which was added by piped command, we lost status codes of first command in pipe:
command | awk ..add_timestamp_.. 2>&1 > command.log
awk
When "command" fails, the ansible shell task ignores it and consider result code of "awk" command only, because bash by default doesn't enable pipefail.

In bottom line: almost all failures in quickstart jobs will be ignored now and jobs will pass.

Tags: ci
Changed in tripleo:
assignee: nobody → Sagi (Sergey) Shnaidman (sshnaidm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart-extras (master)

Fix proposed to branch: master
Review: https://review.openstack.org/450023

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart-extras (master)

Reviewed: https://review.openstack.org/450023
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=f791f5b3cdba607649b5f2cffda8ca177f5100ba
Submitter: Jenkins
Branch: master

commit f791f5b3cdba607649b5f2cffda8ca177f5100ba
Author: Sagi Shnaidman <email address hidden>
Date: Sun Mar 26 19:48:33 2017 +0300

    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

tags: removed: alert
Changed in tripleo:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.