wede2046 / parallel-ssh

Automatically exported from code.google.com/p/parallel-ssh
Other
0 stars 0 forks source link

[patch] random sample of hosts #79

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The attached patch implements a '--sample-size' option.

This will allow you to take a large host list and select a few systems as test 
candidates while preventing you from cherry picking particular hosts.

If the option is not set no behaviour changes.

Additional Info:
Feature ported over from "Forked pssh"

https://groups.google.com/forum/?fromgroups=#!topic/parallel-ssh/BERsqljyv_Q

Original issue reported on code.google.com by jcp...@gmail.com on 7 Jan 2013 at 6:03

Attachments:

GoogleCodeExporter commented 8 years ago
That's an interesting idea. Can you share a little more information about the 
use case?

Original comment by amcna...@gmail.com on 9 Jan 2013 at 7:27

GoogleCodeExporter commented 8 years ago
The main thing that drives this on my end is testing.

I've got a few groups of 300 or so systems.  They are all managed in puppet, 
but I need to be sure my changes work before going live.

Typically what I do is test locally, pick a handful of hosts from each group 
and test them.  Inevitably I use the same hosts over and over to test stuff.

The point of the second test is to make sure boxes that aren't my favourites 
work just fine before having every host pick up the changes or forcing every 
host to test the changes before they go live.

Having pssh pick for me at random helps keep me honest about not playing 
favourites while not really creating any extra work for me on my end.

Original comment by jcp...@gmail.com on 9 Jan 2013 at 7:32

GoogleCodeExporter commented 8 years ago
That makes sense. I still have a nagging worry in the back of my mind that this 
might be a little too specialized, but it really does seem useful.

Original comment by amcna...@gmail.com on 14 Jan 2013 at 4:41

GoogleCodeExporter commented 8 years ago
Given some time to reflect on it, can I talk you into merging this patch?

Original comment by jcp...@gmail.com on 27 Sep 2013 at 3:59

GoogleCodeExporter commented 8 years ago
I think I'm happy with it now. Are you sure it makes sense to have it for all 
of the commands and not just for pssh and pslurp?

Original comment by amcna...@gmail.com on 27 Sep 2013 at 4:29

GoogleCodeExporter commented 8 years ago
For cluster testing I might want to randomly kill httpd on a set of boxes to 
make sure that failover works right (in my test environment of course) so pnuke 
might come in handy too.  That just leaves prsync for which I've got no idea 
why this might be handy, but with 3 out of 4 - my gut says put it for all of 
them and if someone thinks of a use for it with prsync they'll have the option.

Original comment by jcp...@gmail.com on 30 Sep 2013 at 7:21

GoogleCodeExporter commented 8 years ago
Fair enough.

Original comment by amcna...@gmail.com on 30 Sep 2013 at 7:41