Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Bhuvan Arumugam
On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick
sskripn...@mirantis.comwrote:


  I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.


 I was supposed to fix oslo.processutils.ssh with this class, but it may
 be fixed without it, not big deal.




 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?


 Fabric is too much for just command execution on remote server. Spur seems
 like
 good choice for this.


I'd go with Fabric. It support several remote server operations, file
upload/download among them. We could just import the methods we are
interested. It in turn use paramiko supporting most of ssh client options.
If we begin using fabric for file upload/download, it'll open door for more
remote server operations. Bringing in fabric as part of oslo will be cool.

A quick demo script to upload/download files using fabric.

from fabric.api import get, put, run, settings



remote_host = 'localhost'

with settings(host_string=remote_host):

# what is the remote hostname?

run('hostname -f')

# download /etc/hosts file

get('/etc/hosts')

# upload /etc/bashrc to /tmp directory

put('/etc/bashrc', '/tmp/bashrc')

The output may look like:

[localhost] run: hostname -f
[localhost] out: rainbow.local
[localhost] out:

[localhost] download: /Users/bhuvan/localhost/hosts - /etc/hosts
[localhost] put: /etc/bashrc - /tmp/bashrc

-- 
Regards,
Bhuvan Arumugam
www.livecipher.com
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Doug Hellmann
On Mon, Jan 13, 2014 at 7:32 AM, Bhuvan Arumugam bhu...@apache.org wrote:

 On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick 
 sskripn...@mirantis.com wrote:


  I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.


 I was supposed to fix oslo.processutils.ssh with this class, but it may
 be fixed without it, not big deal.




 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?


 Fabric is too much for just command execution on remote server. Spur
 seems like
 good choice for this.


 I'd go with Fabric. It support several remote server operations, file
 upload/download among them. We could just import the methods we are
 interested. It in turn use paramiko supporting most of ssh client options.
 If we begin using fabric for file upload/download, it'll open door for more
 remote server operations. Bringing in fabric as part of oslo will be cool.


Where are we doing those sorts of operations?

Doug




 A quick demo script to upload/download files using fabric.

 from fabric.api import get, put, run, settings



 remote_host = 'localhost'

 with settings(host_string=remote_host):

 # what is the remote hostname?

 run('hostname -f')

 # download /etc/hosts file

 get('/etc/hosts')

 # upload /etc/bashrc to /tmp directory

 put('/etc/bashrc', '/tmp/bashrc')

 The output may look like:

 [localhost] run: hostname -f
 [localhost] out: rainbow.local
 [localhost] out:

 [localhost] download: /Users/bhuvan/localhost/hosts - /etc/hosts
 [localhost] put: /etc/bashrc - /tmp/bashrc

 --
 Regards,
 Bhuvan Arumugam
 www.livecipher.com

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Bhuvan Arumugam
On Mon, Jan 13, 2014 at 7:02 AM, Doug Hellmann
doug.hellm...@dreamhost.comwrote:




 On Mon, Jan 13, 2014 at 7:32 AM, Bhuvan Arumugam bhu...@apache.orgwrote:

 On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick 
 sskripn...@mirantis.com wrote:


  I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.


 I was supposed to fix oslo.processutils.ssh with this class, but it may
 be fixed without it, not big deal.




 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?


 Fabric is too much for just command execution on remote server. Spur
 seems like
 good choice for this.


 I'd go with Fabric. It support several remote server operations, file
 upload/download among them. We could just import the methods we are
 interested. It in turn use paramiko supporting most of ssh client options.
 If we begin using fabric for file upload/download, it'll open door for more
 remote server operations. Bringing in fabric as part of oslo will be cool.


 Where are we doing those sorts of operations?


Currently, we don't upload/download files to remote server through ssh/scp.
We do execute commands, pipe multiple commands in few tempest when ssh is
enabled. With oslo/fabric, we may develop a common ground to deal with
remote servers, be it executing commands or dealing with files.
 --
Regards,
Bhuvan Arumugam
www.livecipher.com
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Doug Hellmann
On Mon, Jan 13, 2014 at 11:34 AM, Bhuvan Arumugam bhu...@apache.org wrote:


 On Mon, Jan 13, 2014 at 7:02 AM, Doug Hellmann 
 doug.hellm...@dreamhost.com wrote:




 On Mon, Jan 13, 2014 at 7:32 AM, Bhuvan Arumugam bhu...@apache.orgwrote:

 On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick 
 sskripn...@mirantis.com wrote:


  I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.


 I was supposed to fix oslo.processutils.ssh with this class, but it may
 be fixed without it, not big deal.




 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?


 Fabric is too much for just command execution on remote server. Spur
 seems like
 good choice for this.


 I'd go with Fabric. It support several remote server operations, file
 upload/download among them. We could just import the methods we are
 interested. It in turn use paramiko supporting most of ssh client options.
 If we begin using fabric for file upload/download, it'll open door for more
 remote server operations. Bringing in fabric as part of oslo will be cool.


 Where are we doing those sorts of operations?


 Currently, we don't upload/download files to remote server through
 ssh/scp. We do execute commands, pipe multiple commands in few tempest when
 ssh is enabled. With oslo/fabric, we may develop a common ground to deal
 with remote servers, be it executing commands or dealing with files.


Are we using ssh to run commands anywhere else in OpenStack? Maybe in one
of the orchestration layers like heat or trove?

Doug




  --
 Regards,
 Bhuvan Arumugam
 www.livecipher.com

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Greg Hill
Trove doesn't use ssh afaik.  It has an agent that runs in the guest that is 
communicated with via our normal RPC messaging options.

Greg

On Jan 13, 2014, at 11:10 AM, Doug Hellmann 
doug.hellm...@dreamhost.commailto:doug.hellm...@dreamhost.com wrote:




On Mon, Jan 13, 2014 at 11:34 AM, Bhuvan Arumugam 
bhu...@apache.orgmailto:bhu...@apache.org wrote:

On Mon, Jan 13, 2014 at 7:02 AM, Doug Hellmann 
doug.hellm...@dreamhost.commailto:doug.hellm...@dreamhost.com wrote:



On Mon, Jan 13, 2014 at 7:32 AM, Bhuvan Arumugam 
bhu...@apache.orgmailto:bhu...@apache.org wrote:
On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick 
sskripn...@mirantis.commailto:sskripn...@mirantis.com wrote:

I appreciate that we want to fix the ssh client. I'm not certain that writing 
our own is the best answer.

I was supposed to fix oslo.processutils.ssh with this class, but it may
be fixed without it, not big deal.




In his comments on your pull request, the paramiko author recommended looking 
at Fabric. I know that Fabric has a long history in production. Does it 
provide the required features?


Fabric is too much for just command execution on remote server. Spur seems like
good choice for this.

I'd go with Fabric. It support several remote server operations, file 
upload/download among them. We could just import the methods we are interested. 
It in turn use paramiko supporting most of ssh client options. If we begin 
using fabric for file upload/download, it'll open door for more remote server 
operations. Bringing in fabric as part of oslo will be cool.

Where are we doing those sorts of operations?

Currently, we don't upload/download files to remote server through ssh/scp. We 
do execute commands, pipe multiple commands in few tempest when ssh is enabled. 
With oslo/fabric, we may develop a common ground to deal with remote servers, 
be it executing commands or dealing with files.

Are we using ssh to run commands anywhere else in OpenStack? Maybe in one of 
the orchestration layers like heat or trove?

Doug



 --
Regards,
Bhuvan Arumugam
www.livecipher.comhttp://www.livecipher.com/

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.orgmailto:OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.orgmailto:OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Doug Hellmann
On Mon, Jan 13, 2014 at 12:21 PM, Greg Hill greg.h...@rackspace.com wrote:

  Trove doesn't use ssh afaik.  It has an agent that runs in the guest that
 is communicated with via our normal RPC messaging options.


Good.

Doug




  Greg

  On Jan 13, 2014, at 11:10 AM, Doug Hellmann doug.hellm...@dreamhost.com
 wrote:




 On Mon, Jan 13, 2014 at 11:34 AM, Bhuvan Arumugam bhu...@apache.orgwrote:


  On Mon, Jan 13, 2014 at 7:02 AM, Doug Hellmann 
 doug.hellm...@dreamhost.com wrote:




  On Mon, Jan 13, 2014 at 7:32 AM, Bhuvan Arumugam bhu...@apache.orgwrote:

  On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick 
 sskripn...@mirantis.com wrote:


  I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.


  I was supposed to fix oslo.processutils.ssh with this class, but it
 may
 be fixed without it, not big deal.




 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?


  Fabric is too much for just command execution on remote server. Spur
 seems like
 good choice for this.


  I'd go with Fabric. It support several remote server operations, file
 upload/download among them. We could just import the methods we are
 interested. It in turn use paramiko supporting most of ssh client options.
 If we begin using fabric for file upload/download, it'll open door for more
 remote server operations. Bringing in fabric as part of oslo will be cool.


  Where are we doing those sorts of operations?


  Currently, we don't upload/download files to remote server through
 ssh/scp. We do execute commands, pipe multiple commands in few tempest when
 ssh is enabled. With oslo/fabric, we may develop a common ground to deal
 with remote servers, be it executing commands or dealing with files.


  Are we using ssh to run commands anywhere else in OpenStack? Maybe in
 one of the orchestration layers like heat or trove?

  Doug




  --
 Regards,
 Bhuvan Arumugam
 www.livecipher.com

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


  ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Ben Nemec
 

On 2014-01-13 11:21, Greg Hill wrote: 

 Trove doesn't use ssh afaik. It has an agent that runs in the guest that is 
 communicated with via our normal RPC messaging options. 
 
 Greg

My understanding is that Heat is similar. It uses cloud-init to do its
guest configuration. I'm pretty sure they explicitly decided against
using ssh at some point, so that's unlikely to change either. 

-Ben 

 On Jan 13, 2014, at 11:10 AM, Doug Hellmann doug.hellm...@dreamhost.com 
 wrote: 
 
 On Mon, Jan 13, 2014 at 11:34 AM, Bhuvan Arumugam bhu...@apache.org wrote:
 
 On Mon, Jan 13, 2014 at 7:02 AM, Doug Hellmann doug.hellm...@dreamhost.com 
 wrote:
 
 On Mon, Jan 13, 2014 at 7:32 AM, Bhuvan Arumugam bhu...@apache.org wrote:
 
 On Fri, Jan 10, 2014 at 11:24 PM, Sergey Skripnick sskripn...@mirantis.com 
 wrote: 
 
 I appreciate that we want to fix the ssh client. I'm not certain that writing 
 our own is the best answer. I was supposed to fix oslo.processutils.ssh with 
 this class, but it may
 be fixed without it, not big deal. 
 
 In his comments on your pull request, the paramiko author recommended looking 
 at Fabric. I know that Fabric has a long history in production. Does it 
 provide the required features?
 
 Fabric is too much for just command execution on remote server. Spur seems 
 like
 good choice for this.

I'd go with Fabric. It support several remote server operations, file
upload/download among them. We could just import the methods we are
interested. It in turn use paramiko supporting most of ssh client
options. If we begin using fabric for file upload/download, it'll open
door for more remote server operations. Bringing in fabric as part of
oslo will be cool. 

Where are we doing those sorts of operations? 

Currently, we don't upload/download files to remote server through
ssh/scp. We do execute commands, pipe multiple commands in few tempest
when ssh is enabled. With oslo/fabric, we may develop a common ground to
deal with remote servers, be it executing commands or dealing with
files. 

Are we using ssh to run commands anywhere else in OpenStack? Maybe in
one of the orchestration layers like heat or trove? 

Doug 

 -- 
 
 Regards,
 Bhuvan Arumugam 
 www.livecipher.com [1] 
 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev [2]
 ___
 OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.orghttp://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[2]

 

Links:
--
[1] http://www.livecipher.com/
[2] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-13 Thread Clint Byrum
Excerpts from Doug Hellmann's message of 2014-01-13 09:10:27 -0800:
 On Mon, Jan 13, 2014 at 11:34 AM, Bhuvan Arumugam bhu...@apache.org wrote:
 
 
  On Mon, Jan 13, 2014 at 7:02 AM, Doug Hellmann 
  doug.hellm...@dreamhost.com wrote:
  Where are we doing those sorts of operations?
 
 
  Currently, we don't upload/download files to remote server through
  ssh/scp. We do execute commands, pipe multiple commands in few tempest when
  ssh is enabled. With oslo/fabric, we may develop a common ground to deal
  with remote servers, be it executing commands or dealing with files.
 
 
 Are we using ssh to run commands anywhere else in OpenStack? Maybe in one
 of the orchestration layers like heat or trove?

Heat does not use SSH, though I believe it did in its early days.

SSH belongs to the admins. I don't think OpenStack should be using it.

I see the usefuleness in the tempest case, which tests that the key given
is on the box, and may need to verify other things inside the instance.

However things that won't work with a simple ssh to that box and report
success/fail could also be done just by having an image which calls
back to tempest on boot.

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-10 Thread Doug Hellmann
On Wed, Jan 8, 2014 at 2:31 PM, Sergey Skripnick sskripn...@mirantis.comwrote:





  On Wed, Jan 8, 2014 at 10:43 AM, Eric Windisch ewindi...@docker.com
 wrote:








 About spur: spur is looks ok, but it a bit complicated inside (it uses

 separate threads for non-blocking stdin/stderr reading [1]) and I don't

 know how it would work with eventlet.


 That does sound like it might cause issues. What would we need to do to
 test it?





 Looking at the code, I don't expect it to be an issue. The
 monkey-patching will cause eventlet.spawn to be called for
 threading.Thread. The code looks eventlet-friendly enough on the surface.
 Error handing around file read/write could be affected, but it also looks
 fine.


 Thanks for that analysis Eric.

 Is there any reason for us to prefer one approach over the other, then?

 Doug


 So, there is only one reason left -- oslo lib is more simple and
 lightweight
 (not using threads). Anyway this class is used by stackforge/rally and
 may be used by other projects instead of buggy oslo.processutils.ssh.


I appreciate that we want to fix the ssh client. I'm not certain that
writing our own is the best answer.

In his comments on your pull request, the paramiko author recommended
looking at Fabric. I know that Fabric has a long history in production.
Does it provide the required features?

Doug







 --
 Regards,
 Sergey Skripnick


 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-10 Thread Sergey Skripnick


I appreciate that we want to fix the ssh client. I'm not certain that  
writing our own is the best answer.


I was supposed to fix oslo.processutils.ssh with this class, but it may
be fixed without it, not big deal.




In his comments on your pull request, the paramiko author recommended  
looking at Fabric. I know that Fabric has a long history in production.  
Does it provide the required features?




Fabric is too much for just command execution on remote server. Spur seems  
like

good choice for this.

But I still don't understand: why do we need oslo.processutils.execute? We  
can use
subprocess module. Why do we need oslo.processutils.ssh_execute? We can  
use paramiko

instead.


--
Regards,
Sergey Skripnick

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-10 Thread Doug Hellmann
On Fri, Jan 10, 2014 at 12:54 PM, Sergey Skripnick
sskripn...@mirantis.comwrote:


  I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.


 I was supposed to fix oslo.processutils.ssh with this class, but it may
 be fixed without it, not big deal.




 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?


 Fabric is too much for just command execution on remote server. Spur seems
 like
 good choice for this.


 But I still don't understand: why do we need oslo.processutils.execute? We
 can use
 subprocess module. Why do we need oslo.processutils.ssh_execute? We can
 use paramiko
 instead.


Well, as you've shown, having a wrapper around subprocess to deal with the
I/O properly is useful, especially commands that produce a lot of it. :-)

As far as ssh_execute goes, I don't know the origin but I imagine the
author didn't know about paramiko.

Doug






 --
 Regards,
 Sergey Skripnick

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-10 Thread Sergey Skripnick







On Fri, Jan 10, 2014 at 12:54 PM, Sergey Skripnick  
sskripn...@mirantis.com wrote:







I appreciate that we want to fix the ssh client. I'm not certain that  
writing our own is the best answer.






I was supposed to fix oslo.processutils.ssh with this class, but it may

be fixed without it, not big deal.










In his comments on your pull request, the paramiko author recommended  
looking at Fabric. I know that Fabric has a long history in  
production. Does it provide the required features?








Fabric is too much for just command execution on remote server. Spur  
seems like


good choice for this.



But I still don't understand: why do we need oslo.processutils.execute?  
We can use


subprocess module. Why do we need oslo.processutils.ssh_execute? We can  
use paramiko


instead.


Well, as you've shown, having a wrapper around subprocess to deal with  
the I/O properly is useful, especially commands that produce a lot of  
it. :-)



As far as ssh_execute goes, I don't know the origin but I imagine the  
author didn't know about paramiko.



Doug



ssh_execute is using paramiko :)



--
Regards,
Sergey Skripnick

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-10 Thread Doug Hellmann
On Fri, Jan 10, 2014 at 1:32 PM, Sergey Skripnick
sskripn...@mirantis.comwrote:






 On Fri, Jan 10, 2014 at 12:54 PM, Sergey Skripnick 
 sskripn...@mirantis.com wrote:




 I appreciate that we want to fix the ssh client. I'm not certain that
 writing our own is the best answer.




 I was supposed to fix oslo.processutils.ssh with this class, but it may

 be fixed without it, not big deal.









 In his comments on your pull request, the paramiko author recommended
 looking at Fabric. I know that Fabric has a long history in production.
 Does it provide the required features?






 Fabric is too much for just command execution on remote server. Spur
 seems like

 good choice for this.



 But I still don't understand: why do we need oslo.processutils.execute?
 We can use

 subprocess module. Why do we need oslo.processutils.ssh_execute? We can
 use paramiko

 instead.


 Well, as you've shown, having a wrapper around subprocess to deal with
 the I/O properly is useful, especially commands that produce a lot of it.
 :-)


 As far as ssh_execute goes, I don't know the origin but I imagine the
 author didn't know about paramiko.


 Doug



 ssh_execute is using paramiko :)


See, this is what I get for not looking at git blame. :-)

Doug







 --
 Regards,
 Sergey Skripnick

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-08 Thread Sergey Skripnick





I'd like to explore whether the paramiko team will accept this code (or
something like it). This seems like a perfect opportunity for us to  
contribute

upstream.


+1

The patch is not big and the code seems simple and reasonable enough
to live within paramiko.

Cheers,
FF




I sent a pull request [0] but there is two things:

 nobody know when (and if) it will be merged
 it is still a bit low-level, unlike a patch in oslo

About spur: spur is looks ok, but it a bit complicated inside (it uses
separate threads for non-blocking stdin/stderr reading [1]) and I don't
know how it would work with eventlet.

[0] https://github.com/paramiko/paramiko/pull/245
[1] https://github.com/mwilliamson/spur.py/blob/master/spur/io.py#L22

--
Regards,
Sergey Skripnick

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-08 Thread Doug Hellmann
On Wed, Jan 8, 2014 at 9:34 AM, Sergey Skripnick sskripn...@mirantis.comwrote:




 I'd like to explore whether the paramiko team will accept this code (or
 something like it). This seems like a perfect opportunity for us to
 contribute
 upstream.


 +1

 The patch is not big and the code seems simple and reasonable enough
 to live within paramiko.

 Cheers,
 FF



 I sent a pull request [0] but there is two things:

  nobody know when (and if) it will be merged
  it is still a bit low-level, unlike a patch in oslo


Let's give the paramkio devs a little time to review it.



 About spur: spur is looks ok, but it a bit complicated inside (it uses
 separate threads for non-blocking stdin/stderr reading [1]) and I don't
 know how it would work with eventlet.


That does sound like it might cause issues. What would we need to do to
test it?

Doug




 [0] https://github.com/paramiko/paramiko/pull/245
 [1] https://github.com/mwilliamson/spur.py/blob/master/spur/io.py#L22


 --
 Regards,
 Sergey Skripnick

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-08 Thread Eric Windisch



 About spur: spur is looks ok, but it a bit complicated inside (it uses
 separate threads for non-blocking stdin/stderr reading [1]) and I don't
 know how it would work with eventlet.


 That does sound like it might cause issues. What would we need to do to
 test it?


Looking at the code, I don't expect it to be an issue. The monkey-patching
will cause eventlet.spawn to be called for threading.Thread. The code looks
eventlet-friendly enough on the surface. Error handing around file
read/write could be affected, but it also looks fine.

-- 
Regards,
Eric Windisch
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-08 Thread Doug Hellmann
On Wed, Jan 8, 2014 at 10:43 AM, Eric Windisch ewindi...@docker.com wrote:



 About spur: spur is looks ok, but it a bit complicated inside (it uses
 separate threads for non-blocking stdin/stderr reading [1]) and I don't
 know how it would work with eventlet.


 That does sound like it might cause issues. What would we need to do to
 test it?


 Looking at the code, I don't expect it to be an issue. The monkey-patching
 will cause eventlet.spawn to be called for threading.Thread. The code looks
 eventlet-friendly enough on the surface. Error handing around file
 read/write could be affected, but it also looks fine.


Thanks for that analysis Eric.

Is there any reason for us to prefer one approach over the other, then?

Doug





 --
 Regards,
 Eric Windisch

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-08 Thread Doug Hellmann
On Wed, Jan 8, 2014 at 10:19 AM, Doug Hellmann
doug.hellm...@dreamhost.comwrote:




 On Wed, Jan 8, 2014 at 9:34 AM, Sergey Skripnick 
 sskripn...@mirantis.comwrote:




 I'd like to explore whether the paramiko team will accept this code (or
 something like it). This seems like a perfect opportunity for us to
 contribute
 upstream.


 +1

 The patch is not big and the code seems simple and reasonable enough
 to live within paramiko.

 Cheers,
 FF



 I sent a pull request [0] but there is two things:

  nobody know when (and if) it will be merged
  it is still a bit low-level, unlike a patch in oslo


 Let's give the paramkio devs a little time to review it.


I had a brief conversation with Jeff Forcier, and he likes the idea of
having some version of run() in paramiko. He will comment on the pull
request with some details about what his plans were, but I think we can
count on this going into a version of paramiko -- especially if we help.

Doug






 About spur: spur is looks ok, but it a bit complicated inside (it uses
 separate threads for non-blocking stdin/stderr reading [1]) and I don't
 know how it would work with eventlet.


 That does sound like it might cause issues. What would we need to do to
 test it?

 Doug




 [0] https://github.com/paramiko/paramiko/pull/245
 [1] https://github.com/mwilliamson/spur.py/blob/master/spur/io.py#L22


 --
 Regards,
 Sergey Skripnick

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-08 Thread Sergey Skripnick






On Wed, Jan 8, 2014 at 10:43 AM, Eric Windisch ewindi...@docker.com  
wrote:










About spur: spur is looks ok, but it a bit complicated inside (it uses

separate threads for non-blocking stdin/stderr reading [1]) and I  
don't


know how it would work with eventlet.


That does sound like it might cause issues. What would we need to do  
to test it?









Looking at the code, I don't expect it to be an issue. The  
monkey-patching will cause eventlet.spawn to be called for  
threading.Thread. The code looks eventlet-friendly enough on the  
surface. Error handing around file read/write could be affected, but  
it also looks fine.




Thanks for that analysis Eric.

Is there any reason for us to prefer one approach over the other, then?

Doug


So, there is only one reason left -- oslo lib is more simple and  
lightweight

(not using threads). Anyway this class is used by stackforge/rally and
may be used by other projects instead of buggy oslo.processutils.ssh.



--
Regards,
Sergey Skripnick

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-03 Thread Flavio Percoco

On 02/01/14 11:17 -0500, Doug Hellmann wrote:




On Mon, Dec 30, 2013 at 5:23 AM, Flavio Percoco fla...@redhat.com wrote:

   On 26/12/13 20:05 +0200, Sergey Skripnick wrote:


   Hi all,

   I'm surprised there is no common ssh library in oslo so I filed this
   blueprint[0]. I would be happy to address any comments/suggestions.


   [0] https://blueprints.launchpad.net/oslo/+spec/common-ssh-client



   If you think the BP is ready to be reviewed - which I bet you do since
   you already submitted a patch - please, set a target milestone and
   series. That'll make it pop-up into the BPs review process.


I left a comment on the blueprint, but I'll post to the list for a broader
audience.

I'd like to explore whether the paramiko team will accept this code (or
something like it). This seems like a perfect opportunity for us to contribute
upstream.


+1

The patch is not big and the code seems simple and reasonable enough
to live within paramiko.

Cheers,
FF


--
@flaper87
Flavio Percoco


pgpO0EaRIvpKu.pgp
Description: PGP signature
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-02 Thread Doug Hellmann
On Mon, Dec 30, 2013 at 5:23 AM, Flavio Percoco fla...@redhat.com wrote:

 On 26/12/13 20:05 +0200, Sergey Skripnick wrote:


 Hi all,

 I'm surprised there is no common ssh library in oslo so I filed this
 blueprint[0]. I would be happy to address any comments/suggestions.


 [0] https://blueprints.launchpad.net/oslo/+spec/common-ssh-client



 If you think the BP is ready to be reviewed - which I bet you do since
 you already submitted a patch - please, set a target milestone and
 series. That'll make it pop-up into the BPs review process.


I left a comment on the blueprint, but I'll post to the list for a broader
audience.

I'd like to explore whether the paramiko team will accept this code (or
something like it). This seems like a perfect opportunity for us to
contribute upstream.

Doug
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2014-01-02 Thread Ben Nemec

On 2013-12-30 04:23, Flavio Percoco wrote:

On 26/12/13 20:05 +0200, Sergey Skripnick wrote:


Hi all,

I'm surprised there is no common ssh library in oslo so I filed this
blueprint[0]. I would be happy to address any comments/suggestions.


[0] https://blueprints.launchpad.net/oslo/+spec/common-ssh-client



If you think the BP is ready to be reviewed - which I bet you do since
you already submitted a patch - please, set a target milestone and
series. That'll make it pop-up into the BPs review process.

Cheers,
FF


I definitely think this is a good thing (Nova already has a simple 
wrapper around Paramiko, for example), but I agree with the comments on 
the bp that we should investigate contributing this to paramiko itself.  
It seems like something they should be open to, and then we get help 
with the maintenance from the experts on that project.


Sergey, can you follow up with the paramiko devs to see what their 
feelings are on this?


Thanks.

-Ben

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [oslo] Common SSH

2013-12-30 Thread Flavio Percoco

On 26/12/13 20:05 +0200, Sergey Skripnick wrote:


Hi all,

I'm surprised there is no common ssh library in oslo so I filed this
blueprint[0]. I would be happy to address any comments/suggestions.


[0] https://blueprints.launchpad.net/oslo/+spec/common-ssh-client



If you think the BP is ready to be reviewed - which I bet you do since
you already submitted a patch - please, set a target milestone and
series. That'll make it pop-up into the BPs review process.

Cheers,
FF

--
@flaper87
Flavio Percoco


pgp1AuikxNtkz.pgp
Description: PGP signature
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev