juju-deployer output should be unbuffered

Bug #1423964 reported by Tom Haddon
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mojo: Continuous Delivery for Juju

Bug Description

Currently we do this in mojo/phase.py:

cmd = ['python', deployer, '-c', configs[1], "-l"]

If we change this to this we'd get unbuffered output, which would be helpful when you're sending the output of a mojo run to a log file:

cmd = ['python', '-u', deployer, '-c', configs[1], "-l"]

Tags: papercut
Revision history for this message
Tom Haddon (mthaddon) wrote :

Actually, seems it's line 369:

        cmd = ('python', deployer)

Which should be:

        cmd = ('python', '-u', deployer)

Revision history for this message
Tom Haddon (mthaddon) wrote :

Hmm, tried that and unfortunately it didn't work. Will need to look into the bicommand function in mojo/utils.py

Tom Haddon (mthaddon)
Changed in mojo:
importance: Undecided → Low
Revision history for this message
Paul Collins (pjdc) wrote :

It's a slightly outsized hammer, but setting PYTHONUNBUFFERED in mojo's environment filters down and affects its juju-deployer invocations suitably.

Tom Haddon (mthaddon)
Changed in mojo:
status: New → Confirmed
importance: Low → Medium
Tom Haddon (mthaddon)
tags: added: papercut
Revision history for this message
David Ames (thedac) wrote :

The problem seems to be related to a python script with logging calling another python script with logging.

Juju deployer output is buffered and is flushed at the end of the run like the following example:


When an error occurs this can be hidden by the flushed output.

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.