StarCluster - Mailing List Archive

Re: [Starcluster] connection.execute behavior

From: Dan Yamins <no email>
Date: Fri, 16 Apr 2010 08:48:39 -0400

Justin:

I should have added to the below: it's not urgent (since I can do
everything I need with os.system('ssh -f ...') -- so don't worry if you
don't have time.


On Fri, Apr 16, 2010 at 8:04 AM, Dan Yamins <dyamins_at_gmail.com> wrote:

> Here are two places where behavior of executing a command via
> connection.execute is different from executing it at the actual shell,
> causing trouble:
>
>
> 1) I can run this command fine at the actual shell of one of my node, when
> logged in as root:
>
> su gotdata -c "ssh -f -N -L 27017:localhost:27017
> gotdata_at_ec2-184-73-101-141.compute-1.amazonaws.com"
>
> It runs, returns without blocking, doing exactly what I want (establishing
> an ssh tunnel from one node to another on port 27017).
>
> But when I try to execute this command over the execute method in the
> starcluster shell, it DOES block:
>
> solr_conn.execute('su gotdata -c "ssh -f -N -L 27017:localhost:27017
> gotdata_at_ec2-184-73-101-141.compute-1.amazonaws.com"')
>
> ... and only returns when I manually kill the ssh tunnel that it starts.
> What should I do to get what I want?
>
>
> 2) The same command, minus the su part, runs fine at the actual shell:
>
> ssh -f -N -L 27017:localhost:27017
> gotdata_at_ec2-184-73-101-141.compute-1.amazonaws.com
>
> but when I run this command via the execute method, it fails:
>
> In [31]: solr_conn.execute('ssh -f -N -L 27017:localhost:27017
> gotdata_at_ec2-184-73-101-141.compute-1.amazonaws.com')
> Out[31]: ['Host key verification failed.']
>
> Why is the behavior different?
>
>
> Thanks,
> Dan
>
>
Received on Fri Apr 16 2010 - 08:48:40 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject