EC2Provider.connect() should return sshclient.connect()'s deferred

Bug #614026 reported by Gustavo Niemeyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
High
Kapil Thangavelu

Bug Description

EC2Provider.connect() is currently calling the sshclient.connect() method, and then returning the client itself. It must return the result of sshclient's connect method instead, which is a deferred that once fired will return the client. Without this, there's no way to wait for the connection to complete when using EC2Provider's connect method.

Tags: spike

Related branches

Changed in ensemble:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

it already does, not clear what if any issue there is here.

Changed in ensemble:
assignee: nobody → Kapil Thangavelu (hazmat)
status: Confirmed → Incomplete
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

As we've seen over the spike, it doesn't:

    def _connect_nodes(self, nodes):
        if not nodes:
            raise NoConnection("No Ensemble Nodes")

        # TODO Should we pick a random entry from the nodes list?
        client = SSHClient()
        client.connect(nodes[0].dns_name + ":2181")
        return client

It should be:

    return client.connect(...)

Changed in ensemble:
status: Incomplete → Opinion
status: Opinion → Confirmed
Changed in ensemble:
status: Confirmed → In Progress
Changed in ensemble:
status: In Progress → Fix Committed
Changed in ensemble:
milestone: none → 0.1
Changed in ensemble:
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.