juju show-action-output should return an error code if --wait is used and the timeout is reached

Bug #1827251 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Tim McNamara

Bug Description

juju show-action-output should return an error code if --wait is used and the timeout is reached.

Help says "To block until the result is known completed or failed, use the --wait option with a duration, as in --wait 5s or --wait 1h."

However, the current behavior in juju 2.5.4 is that if the timeout is reached, and the action is still in 'running' state, juju does not return an error (exits with code 0). This is does not agree with the help's description. The caller has to parse the output to see if the action completed or not.

Expected behavior would be that if the timeout is reached and the action has not completed or failed, that juju exits with an error code.

Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.6.1
Tim Penhey (thumper)
tags: added: bite
tags: added: bitesize
removed: bite
Changed in juju:
milestone: 2.6.1 → 2.6.2
Changed in juju:
milestone: 2.6.2 → 2.6.3
Revision history for this message
Tim McNamara (tim-clicks) wrote :

Thanks for reporting this Jason. Code that raises an error when the timeout has been reached and the state is still running/pending is currently under review.

If you would like to follow the details, you are welcome to monitor progress here: https://github.com/juju/juju/pull/10214

Changed in juju:
status: Triaged → In Progress
assignee: nobody → Tim McNamara (tim-clicks)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
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.