Modifications to exec_command breaks all methods in linux RemoteClient

Bug #1038561 reported by Daryl Walleck
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
High
Jaroslav Henner

Bug Description

When exec command was modified to return a tuple, none of the methods in the linux RemoteClient were corrected to handle the different return type. This breaks most methods of the class.

Daryl Walleck (dwalleck)
Changed in tempest:
importance: Undecided → High
assignee: nobody → Daryl Walleck (dwalleck)
Revision history for this message
Jaroslav Henner (jhenner) wrote :

Also note the returned tuple doesn't have consistent order.
{{{
051075a5 tempest/common/ssh.py (Jay Pipes 2012-04-28 17:39:37 -0400 101) except socket.timeout:
051075a5 tempest/common/ssh.py (Jay Pipes 2012-04-28 17:39:37 -0400 102) if status == 0:
051075a5 tempest/common/ssh.py (Jay Pipes 2012-04-28 17:39:37 -0400 103) return None, status
1465d61a storm/common/ssh.py (Daryl Walleck 2011-11-02 02:22:15 -0500 104) ssh.close()
051075a5 tempest/common/ssh.py (Jay Pipes 2012-04-28 17:39:37 -0400 105) return status, output
}}}

Revision history for this message
Jaroslav Henner (jhenner) wrote :

I also see and tested that there is possibility to deadlock. The code is reading only from stdout. If there is enough output to stderr, the producing process may get blocked until some data is read from stderr, which is never read.

Revision history for this message
Jay Pipes (jaypipes) wrote :

LOL, thx for the blame :) OK, I'll get right on this.

Cheers,

-jay

Changed in tempest:
assignee: Daryl Walleck (dwalleck) → Jay Pipes (jaypipes)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
assignee: Jay Pipes (jaypipes) → Jaroslav Henner (jhenner)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/13011
Committed: http://github.com/openstack/tempest/commit/ab3278453b0f6a341b5f5f4372efb53f1f11ac28
Submitter: Jenkins
Branch: master

commit ab3278453b0f6a341b5f5f4372efb53f1f11ac28
Author: Jaroslav Henner <email address hidden>
Date: Tue Sep 11 15:44:29 2012 +0200

    Fix ssh.Client retval and deadlock danger LP#1038561

    Returning tuples is not handy for further checking of error states.
    Using exception with exit_status and stderr output as its args instead.

    There was a possibility to deadlock when reading only stdout. Solved by
    using `select`.

    Change-Id: Iead3540a7bd0bfce3ad092620b86ef11b9f0b622

Changed in tempest:
status: In Progress → Fix Committed
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.