tee masks errors?

Bug #885091 reported by Jesse Andrews
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Dean Troyer

Bug Description

running stack.sh via jenkins, occasionally I get a lot of

Waiting stack.sh to finish...
+ tail -F /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5
+ cat /opt/kvmstack/instances/diablo-qemu-pause/console.log
+ grep -q 'All done'
+ sleep 5

instead of seeing the output as it happens. If you have a system that captures the output, it would be nice to make logging using tee (which seems to buffer the output) optional?

Revision history for this message
Jesse Andrews (anotherjesse) wrote :

The issue is if jenkins has an abort after X minutes without finishing you never see the error.

Currently I have my jenkins job do the following:

    sed -i 's/) 2>&1 | tee "${LOGFILE}"/)/' stack.sh

So that it doesn't try to tee - and I see the errors

Revision history for this message
Jesse Andrews (anotherjesse) wrote :

Adding smoser since this is the commit that caused this behavor: https://github.com/cloudbuilders/devstack/commit/b94f4bf35b9c2acd469f839515a96f9c30a45331

Changed in devstack:
status: New → In Progress
Revision history for this message
Dean Troyer (dtroyer) wrote :

Proposal https://review.openstack.org/2653 eliminates the need for subshells to perform logging in stack.sh. Setting LOGFILE="-" turns off logging and bypasses using tee or pipes at all so Jenkins should be able to handle the output directly with no additional buffering.

Changed in devstack:
assignee: nobody → Dean Troyer (dtroyer)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/2653
Committed: http://github.com/openstack-dev/devstack/commit/471de7a34ba3a3842576fda56602884bf149a9fc
Submitter: Jenkins
Branch: master

commit 471de7a34ba3a3842576fda56602884bf149a9fc
Author: Dean Troyer <email address hidden>
Date: Tue Dec 27 11:45:55 2011 -0600

    Improve log file handling:

    * Elimiate subshells to produce logfiles (fixes bug 885091)
    * Clean up log files older than 7 days (default)
    * Append date/time to specified log file name
    * Default LOGFILE='', now must set to get logging

    This changes the default behaviour of stack.sh to not write a log file
    unless LOGFILE is set.

    Change-Id: I5d3fb65e12ccdb52fca5a41ee8f5777c046cd375

Changed in devstack:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in devstack:
status: Fix Committed → 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.