Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] random sample of hosts #79

Open
GoogleCodeExporter opened this issue Mar 10, 2016 · 7 comments
Open

[patch] random sample of hosts #79

GoogleCodeExporter opened this issue Mar 10, 2016 · 7 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

Fair enough.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant